Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5a27fa7c72 |
@@ -32,16 +32,6 @@ return array(
|
|||||||
'option_options_method' => 'getLanguages',
|
'option_options_method' => 'getLanguages',
|
||||||
'save_method' => 'storeSettingField',
|
'save_method' => 'storeSettingField',
|
||||||
),
|
),
|
||||||
'panel_default_theme' => array(
|
|
||||||
'label' => $lng['serversettings']['default_theme'],
|
|
||||||
'settinggroup' => 'panel',
|
|
||||||
'varname' => 'default_theme',
|
|
||||||
'type' => 'option',
|
|
||||||
'default' => 'Froxlor',
|
|
||||||
'option_mode' => 'one',
|
|
||||||
'option_options_method' => 'getThemes',
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
),
|
|
||||||
'panel_natsorting' => array(
|
'panel_natsorting' => array(
|
||||||
'label' => $lng['serversettings']['natsorting'],
|
'label' => $lng['serversettings']['natsorting'],
|
||||||
'settinggroup' => 'panel',
|
'settinggroup' => 'panel',
|
||||||
@@ -74,7 +64,7 @@ return array(
|
|||||||
'type' => 'option',
|
'type' => 'option',
|
||||||
'default' => 'Manual',
|
'default' => 'Manual',
|
||||||
'option_mode' => 'one',
|
'option_mode' => 'one',
|
||||||
'option_options' => array('Manual' => $lng['serversettings']['manual'], 'Dropdown' => $lng['serversettings']['dropdown']),
|
'option_options' => array('Manual' => 'Manual', 'Dropdown' => 'Dropdown'),
|
||||||
'save_method' => 'storeSettingField',
|
'save_method' => 'storeSettingField',
|
||||||
),
|
),
|
||||||
'panel_adminmail' => array(
|
'panel_adminmail' => array(
|
||||||
@@ -161,6 +151,14 @@ return array(
|
|||||||
'default' => false,
|
'default' => false,
|
||||||
'save_method' => 'storeSettingField',
|
'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(
|
'panel_allow_domain_change_admin' => array(
|
||||||
'label' => $lng['serversettings']['panel_allow_domain_change_admin'],
|
'label' => $lng['serversettings']['panel_allow_domain_change_admin'],
|
||||||
'settinggroup' => 'panel',
|
'settinggroup' => 'panel',
|
||||||
|
|||||||
@@ -38,14 +38,6 @@ return array(
|
|||||||
'default' => false,
|
'default' => false,
|
||||||
'save_method' => 'storeSettingField',
|
'save_method' => 'storeSettingField',
|
||||||
),
|
),
|
||||||
'login_domain_login' => array(
|
|
||||||
'label' => $lng['serversettings']['login_domain_login'],
|
|
||||||
'settinggroup' => 'login',
|
|
||||||
'varname' => 'domain_login',
|
|
||||||
'type' => 'bool',
|
|
||||||
'default' => false,
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
),
|
|
||||||
'login_maxloginattempts' => array(
|
'login_maxloginattempts' => array(
|
||||||
'label' => $lng['serversettings']['maxloginattempts'],
|
'label' => $lng['serversettings']['maxloginattempts'],
|
||||||
'settinggroup' => 'login',
|
'settinggroup' => 'login',
|
||||||
@@ -70,15 +62,6 @@ return array(
|
|||||||
'default' => 0,
|
'default' => 0,
|
||||||
'save_method' => 'storeSettingField',
|
'save_method' => 'storeSettingField',
|
||||||
),
|
),
|
||||||
'panel_password_regex' => array(
|
|
||||||
'label' => $lng['serversettings']['panel_password_regex'],
|
|
||||||
'settinggroup' => 'panel',
|
|
||||||
'varname' => 'password_regex',
|
|
||||||
'type' => 'string',
|
|
||||||
'default' => '',
|
|
||||||
/* 'plausibility_check_method' => 'checkValidRegEx', */
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
),
|
|
||||||
'customer_accountprefix' => array(
|
'customer_accountprefix' => array(
|
||||||
'label' => $lng['serversettings']['accountprefix'],
|
'label' => $lng['serversettings']['accountprefix'],
|
||||||
'settinggroup' => 'customer',
|
'settinggroup' => 'customer',
|
||||||
|
|||||||
@@ -27,10 +27,8 @@ return array(
|
|||||||
'settinggroup' => 'system',
|
'settinggroup' => 'system',
|
||||||
'varname' => 'documentroot_prefix',
|
'varname' => 'documentroot_prefix',
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'string_type' => 'dir',
|
|
||||||
'default' => '/var/customers/webs/',
|
'default' => '/var/customers/webs/',
|
||||||
'save_method' => 'storeSettingField',
|
'save_method' => 'storeSettingField',
|
||||||
'plausibility_check_method' => 'checkPathConflicts'
|
|
||||||
),
|
),
|
||||||
'system_ipaddress' => array(
|
'system_ipaddress' => array(
|
||||||
'label' => $lng['serversettings']['ipaddress'],
|
'label' => $lng['serversettings']['ipaddress'],
|
||||||
@@ -60,22 +58,6 @@ return array(
|
|||||||
'default' => '',
|
'default' => '',
|
||||||
'save_method' => 'storeSettingHostname',
|
'save_method' => 'storeSettingHostname',
|
||||||
),
|
),
|
||||||
'system_froxlordirectlyviahostname' => array(
|
|
||||||
'label' => $lng['serversettings']['froxlordirectlyviahostname'],
|
|
||||||
'settinggroup' => 'system',
|
|
||||||
'varname' => 'froxlordirectlyviahostname',
|
|
||||||
'type' => 'bool',
|
|
||||||
'default' => false,
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
),
|
|
||||||
'system_validatedomain' => array(
|
|
||||||
'label' => $lng['serversettings']['validate_domain'],
|
|
||||||
'settinggroup' => 'system',
|
|
||||||
'varname' => 'validate_domain',
|
|
||||||
'type' => 'bool',
|
|
||||||
'default' => true,
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
),
|
|
||||||
'system_stdsubdomain' => array(
|
'system_stdsubdomain' => array(
|
||||||
'label' => $lng['serversettings']['stdsubdomainhost'],
|
'label' => $lng['serversettings']['stdsubdomainhost'],
|
||||||
'settinggroup' => 'system',
|
'settinggroup' => 'system',
|
||||||
@@ -93,6 +75,15 @@ return array(
|
|||||||
'plausibility_check_method' => 'checkMysqlAccessHost',
|
'plausibility_check_method' => 'checkMysqlAccessHost',
|
||||||
'save_method' => 'storeSettingMysqlAccessHost',
|
'save_method' => 'storeSettingMysqlAccessHost',
|
||||||
),
|
),
|
||||||
|
'system_realtime_port' => array(
|
||||||
|
'label' => $lng['serversettings']['system_realtime_port'],
|
||||||
|
'settinggroup' => 'system',
|
||||||
|
'varname' => 'realtime_port',
|
||||||
|
'type' => (function_exists('socket_create') ? 'int' : 'hidden'),
|
||||||
|
'int_max' => 65535,
|
||||||
|
'default' => 0,
|
||||||
|
'save_method' => 'storeSettingField',
|
||||||
|
),
|
||||||
'system_index_file_extension' => array(
|
'system_index_file_extension' => array(
|
||||||
'label' => $lng['serversettings']['index_file_extension'],
|
'label' => $lng['serversettings']['index_file_extension'],
|
||||||
'settinggroup' => 'system',
|
'settinggroup' => 'system',
|
||||||
@@ -122,35 +113,6 @@ return array(
|
|||||||
'type' => 'hidden',
|
'type' => 'hidden',
|
||||||
'default' => 'www-data',
|
'default' => 'www-data',
|
||||||
),
|
),
|
||||||
'system_report_enable' => array(
|
|
||||||
'label' => $lng['serversettings']['report']['report'],
|
|
||||||
'settinggroup' => 'system',
|
|
||||||
'varname' => 'report_enable',
|
|
||||||
'type' => 'bool',
|
|
||||||
'default' => true,
|
|
||||||
'cronmodule' => 'froxlor/reports',
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
),
|
|
||||||
'system_report_webmax' => array(
|
|
||||||
'label' => $lng['serversettings']['report']['webmax'],
|
|
||||||
'settinggroup' => 'system',
|
|
||||||
'varname' => 'report_webmax',
|
|
||||||
'type' => 'int',
|
|
||||||
'int_min' => 1,
|
|
||||||
'int_max' => 99,
|
|
||||||
'default' => 90,
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
),
|
|
||||||
'system_report_trafficmax' => array(
|
|
||||||
'label' => $lng['serversettings']['report']['trafficmax'],
|
|
||||||
'settinggroup' => 'system',
|
|
||||||
'varname' => 'report_trafficmax',
|
|
||||||
'type' => 'int',
|
|
||||||
'int_min' => 1,
|
|
||||||
'int_max' => 99,
|
|
||||||
'default' => 90,
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
),
|
|
||||||
'system_debug_cron' => array(
|
'system_debug_cron' => array(
|
||||||
'label' => $lng['serversettings']['cron']['debug'],
|
'label' => $lng['serversettings']['cron']['debug'],
|
||||||
'settinggroup' => 'system',
|
'settinggroup' => 'system',
|
||||||
|
|||||||
@@ -27,28 +27,12 @@ return array(
|
|||||||
'settinggroup' => 'system',
|
'settinggroup' => 'system',
|
||||||
'varname' => 'webserver',
|
'varname' => 'webserver',
|
||||||
'type' => 'option',
|
'type' => 'option',
|
||||||
'default' => 'apache2',
|
'default' => 'Apache2',
|
||||||
'option_mode' => 'one',
|
'option_mode' => 'one',
|
||||||
'option_options' => array('apache2' => 'Apache 2', 'lighttpd' => 'ligHTTPd', 'nginx' => 'Nginx'),
|
'option_options' => array('apache2' => 'Apache 2', 'lighttpd' => 'ligHTTPd'),
|
||||||
'save_method' => 'storeSettingField',
|
'save_method' => 'storeSettingField',
|
||||||
'overview_option' => true
|
'overview_option' => true
|
||||||
),
|
),
|
||||||
'system_httpuser' => array(
|
|
||||||
'label' => $lng['admin']['webserver_user'],
|
|
||||||
'settinggroup' => 'system',
|
|
||||||
'varname' => 'httpuser',
|
|
||||||
'type' => 'string',
|
|
||||||
'default' => 'www-data',
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
),
|
|
||||||
'system_httpgroup' => array(
|
|
||||||
'label' => $lng['admin']['webserver_group'],
|
|
||||||
'settinggroup' => 'system',
|
|
||||||
'varname' => 'httpgroup',
|
|
||||||
'type' => 'string',
|
|
||||||
'default' => 'www-data',
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
),
|
|
||||||
'system_apacheconf_vhost' => array(
|
'system_apacheconf_vhost' => array(
|
||||||
'label' => $lng['serversettings']['apacheconf_vhost'],
|
'label' => $lng['serversettings']['apacheconf_vhost'],
|
||||||
'settinggroup' => 'system',
|
'settinggroup' => 'system',
|
||||||
@@ -76,6 +60,22 @@ return array(
|
|||||||
'default' => '/etc/apache2/htpasswd/',
|
'default' => '/etc/apache2/htpasswd/',
|
||||||
'save_method' => 'storeSettingField',
|
'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(
|
'system_logfiles_directory' => array(
|
||||||
'label' => $lng['serversettings']['logfiles_directory'],
|
'label' => $lng['serversettings']['logfiles_directory'],
|
||||||
'settinggroup' => 'system',
|
'settinggroup' => 'system',
|
||||||
@@ -112,41 +112,6 @@ return array(
|
|||||||
'default' => '',
|
'default' => '',
|
||||||
'save_method' => 'storeSettingField',
|
'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_phpreload_command' => array(
|
|
||||||
'label' => $lng['serversettings']['phpreload_command'],
|
|
||||||
'settinggroup' => 'system',
|
|
||||||
'varname' => 'phpreload_command',
|
|
||||||
'type' => (getSetting('phpfpm', 'enabled') == '1') ? 'hidden' : 'string',
|
|
||||||
'default' => '',
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
'websrv_avail' => array('nginx')
|
|
||||||
),
|
|
||||||
'system_nginx_php_backend' => array(
|
|
||||||
'label' => $lng['serversettings']['nginx_php_backend'],
|
|
||||||
'settinggroup' => 'system',
|
|
||||||
'varname' => 'nginx_php_backend',
|
|
||||||
'type' => (getSetting('phpfpm', 'enabled') == '1') ? 'hidden' : 'string',
|
|
||||||
'default' => '127.0.0.1:8888',
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
'websrv_avail' => array('nginx')
|
|
||||||
),
|
|
||||||
'system_mod_log_sql' => array(
|
|
||||||
'label' => $lng['serversettings']['mod_log_sql'],
|
|
||||||
'settinggroup' => 'system',
|
|
||||||
'varname' => 'mod_log_sql',
|
|
||||||
'type' => 'bool',
|
|
||||||
'default' => false,
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
'websrv_avail' => array('apache2')
|
|
||||||
),
|
|
||||||
'defaultwebsrverrhandler_enabled' => array(
|
'defaultwebsrverrhandler_enabled' => array(
|
||||||
'label' => $lng['serversettings']['defaultwebsrverrhandler_enabled'],
|
'label' => $lng['serversettings']['defaultwebsrverrhandler_enabled'],
|
||||||
'settinggroup' => 'defaultwebsrverrhandler',
|
'settinggroup' => 'defaultwebsrverrhandler',
|
||||||
@@ -162,7 +127,6 @@ return array(
|
|||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'default' => '',
|
'default' => '',
|
||||||
'save_method' => 'storeSettingField',
|
'save_method' => 'storeSettingField',
|
||||||
'websrv_avail' => array('apache2', 'nginx')
|
|
||||||
),
|
),
|
||||||
'defaultwebsrverrhandler_err403' => array(
|
'defaultwebsrverrhandler_err403' => array(
|
||||||
'label' => $lng['serversettings']['defaultwebsrverrhandler_err403'],
|
'label' => $lng['serversettings']['defaultwebsrverrhandler_err403'],
|
||||||
@@ -171,7 +135,6 @@ return array(
|
|||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'default' => '',
|
'default' => '',
|
||||||
'save_method' => 'storeSettingField',
|
'save_method' => 'storeSettingField',
|
||||||
'websrv_avail' => array('apache2', 'nginx')
|
|
||||||
),
|
),
|
||||||
'defaultwebsrverrhandler_err404' => array(
|
'defaultwebsrverrhandler_err404' => array(
|
||||||
'label' => $lng['serversettings']['defaultwebsrverrhandler_err404'],
|
'label' => $lng['serversettings']['defaultwebsrverrhandler_err404'],
|
||||||
@@ -188,27 +151,6 @@ return array(
|
|||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'default' => '',
|
'default' => '',
|
||||||
'save_method' => 'storeSettingField',
|
'save_method' => 'storeSettingField',
|
||||||
'websrv_avail' => array('apache2', 'nginx')
|
|
||||||
),
|
|
||||||
'customredirect_enabled' => array(
|
|
||||||
'label' => $lng['serversettings']['customredirect_enabled'],
|
|
||||||
'settinggroup' => 'customredirect',
|
|
||||||
'varname' => 'enabled',
|
|
||||||
'type' => 'bool',
|
|
||||||
'default' => false,
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
'websrv_avail' => array('apache2', 'lighttpd')
|
|
||||||
),
|
|
||||||
'customredirect_default' => array(
|
|
||||||
'label' => $lng['serversettings']['customredirect_default'],
|
|
||||||
'settinggroup' => 'customredirect',
|
|
||||||
'varname' => 'default',
|
|
||||||
'type' => 'option',
|
|
||||||
'default' => '1',
|
|
||||||
'option_mode' => 'one',
|
|
||||||
'option_options_method' => 'getRedirectCodes',
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
'websrv_avail' => array('apache2', 'lighttpd')
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -222,7 +164,6 @@ return array(
|
|||||||
'type' => 'bool',
|
'type' => 'bool',
|
||||||
'default' => false,
|
'default' => false,
|
||||||
'save_method' => 'storeSettingField',
|
'save_method' => 'storeSettingField',
|
||||||
'overview_option' => true
|
|
||||||
),
|
),
|
||||||
'system_ssl_cert_file' => array(
|
'system_ssl_cert_file' => array(
|
||||||
'label' => $lng['serversettings']['ssl']['ssl_cert_file'],
|
'label' => $lng['serversettings']['ssl']['ssl_cert_file'],
|
||||||
@@ -254,16 +195,6 @@ return array(
|
|||||||
'default' => '',
|
'default' => '',
|
||||||
'save_method' => 'storeSettingField',
|
'save_method' => 'storeSettingField',
|
||||||
),
|
),
|
||||||
'system_ssl_cert_chainfile' => array(
|
|
||||||
'label' => $lng['admin']['ipsandports']['ssl_cert_chainfile'],
|
|
||||||
'settinggroup' => 'system',
|
|
||||||
'varname' => 'ssl_cert_chainfile',
|
|
||||||
'type' => 'string',
|
|
||||||
'string_type' => 'file',
|
|
||||||
'string_emptyallowed' => true,
|
|
||||||
'default' => '',
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
),
|
|
||||||
'system_ssl_openssl_cnf' => array(
|
'system_ssl_openssl_cnf' => array(
|
||||||
'label' => $lng['serversettings']['ssl']['openssl_cnf'],
|
'label' => $lng['serversettings']['ssl']['openssl_cnf'],
|
||||||
'settinggroup' => 'system',
|
'settinggroup' => 'system',
|
||||||
@@ -277,4 +208,4 @@ return array(
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -1,143 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This file is part of the Froxlor project.
|
|
||||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the COPYING
|
|
||||||
* file that was distributed with this source code. You can also view the
|
|
||||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
|
||||||
*
|
|
||||||
* @copyright (c) the authors
|
|
||||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
|
||||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
|
||||||
* @package Settings
|
|
||||||
* @version $Id$
|
|
||||||
*/
|
|
||||||
|
|
||||||
return array(
|
|
||||||
'groups' => array(
|
|
||||||
'fcgid' => array(
|
|
||||||
'title' => $lng['admin']['fcgid_settings'],
|
|
||||||
'websrv_avail' => array('apache2', 'lighttpd'),
|
|
||||||
'fields' => array(
|
|
||||||
'system_mod_fcgid_enabled' => array(
|
|
||||||
'label' => $lng['serversettings']['mod_fcgid'],
|
|
||||||
'settinggroup' => 'system',
|
|
||||||
'varname' => 'mod_fcgid',
|
|
||||||
'type' => 'bool',
|
|
||||||
'default' => false,
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
'plausibility_check_method' => 'checkFcgidPhpFpm',
|
|
||||||
'overview_option' => true
|
|
||||||
),
|
|
||||||
'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/',
|
|
||||||
'plausibility_check_method' => 'checkPathConflicts',
|
|
||||||
'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' => 1,
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
'websrv_avail' => array('apache2')
|
|
||||||
),
|
|
||||||
'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',
|
|
||||||
),
|
|
||||||
'system_mod_fcgid_defaultini' => array(
|
|
||||||
'label' => $lng['serversettings']['mod_fcgid']['defaultini'],
|
|
||||||
'settinggroup' => 'system',
|
|
||||||
'varname' => 'mod_fcgid_defaultini',
|
|
||||||
'type' => 'option',
|
|
||||||
'default' => '1',
|
|
||||||
'option_mode' => 'one',
|
|
||||||
'option_options_method' => 'getPhpConfigs',
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
),
|
|
||||||
'system_mod_fcgid_enabled_ownvhost' => array(
|
|
||||||
'label' => $lng['serversettings']['mod_fcgid_ownvhost'],
|
|
||||||
'settinggroup' => 'system',
|
|
||||||
'varname' => 'mod_fcgid_ownvhost',
|
|
||||||
'type' => 'bool',
|
|
||||||
'default' => false,
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
'websrv_avail' => array('apache2')
|
|
||||||
),
|
|
||||||
'system_mod_fcgid_httpuser' => array(
|
|
||||||
'label' => $lng['admin']['mod_fcgid_user'],
|
|
||||||
'settinggroup' => 'system',
|
|
||||||
'varname' => 'mod_fcgid_httpuser',
|
|
||||||
'type' => 'string',
|
|
||||||
'default' => 'froxlorlocal',
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
'websrv_avail' => array('apache2')
|
|
||||||
),
|
|
||||||
'system_mod_fcgid_httpgroup' => array(
|
|
||||||
'label' => $lng['admin']['mod_fcgid_group'],
|
|
||||||
'settinggroup' => 'system',
|
|
||||||
'varname' => 'mod_fcgid_httpgroup',
|
|
||||||
'type' => 'string',
|
|
||||||
'default' => 'froxlorlocal',
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
'websrv_avail' => array('apache2')
|
|
||||||
),
|
|
||||||
'system_mod_fcgid_defaultini_ownvhost' => array(
|
|
||||||
'label' => $lng['serversettings']['mod_fcgid']['defaultini_ownvhost'],
|
|
||||||
'settinggroup' => 'system',
|
|
||||||
'varname' => 'mod_fcgid_defaultini_ownvhost',
|
|
||||||
'type' => 'option',
|
|
||||||
'default' => '1',
|
|
||||||
'option_mode' => 'one',
|
|
||||||
'option_options_method' => 'getPhpConfigs',
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
'websrv_avail' => array('apache2')
|
|
||||||
),
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -1,161 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This file is part of the Froxlor project.
|
|
||||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the COPYING
|
|
||||||
* file that was distributed with this source code. You can also view the
|
|
||||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
|
||||||
*
|
|
||||||
* @copyright (c) the authors
|
|
||||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
|
||||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
|
||||||
* @package Settings
|
|
||||||
* @version $Id$
|
|
||||||
*/
|
|
||||||
|
|
||||||
return array(
|
|
||||||
'groups' => array(
|
|
||||||
'phpfpm' => array(
|
|
||||||
'title' => $lng['admin']['phpfpm_settings'],
|
|
||||||
'fields' => array(
|
|
||||||
'system_phpfpm_enabled' => array(
|
|
||||||
'label' => $lng['serversettings']['phpfpm'],
|
|
||||||
'settinggroup' => 'phpfpm',
|
|
||||||
'varname' => 'enabled',
|
|
||||||
'type' => 'bool',
|
|
||||||
'default' => false,
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
'plausibility_check_method' => 'checkFcgidPhpFpm',
|
|
||||||
'overview_option' => true
|
|
||||||
),
|
|
||||||
'system_phpfpm_enabled_ownvhost' => array(
|
|
||||||
'label' => $lng['phpfpm']['ownvhost'],
|
|
||||||
'settinggroup' => 'phpfpm',
|
|
||||||
'varname' => 'enabled_ownvhost',
|
|
||||||
'type' => 'bool',
|
|
||||||
'default' => false,
|
|
||||||
'save_method' => 'storeSettingField'
|
|
||||||
),
|
|
||||||
'system_phpfpm_httpuser' => array(
|
|
||||||
'label' => $lng['phpfpm']['vhost_httpuser'],
|
|
||||||
'settinggroup' => 'phpfpm',
|
|
||||||
'varname' => 'vhost_httpuser',
|
|
||||||
'type' => 'string',
|
|
||||||
'default' => 'froxlorlocal',
|
|
||||||
'save_method' => 'storeSettingField'
|
|
||||||
),
|
|
||||||
'system_phpfpm_httpgroup' => array(
|
|
||||||
'label' => $lng['phpfpm']['vhost_httpgroup'],
|
|
||||||
'settinggroup' => 'phpfpm',
|
|
||||||
'varname' => 'vhost_httpgroup',
|
|
||||||
'type' => 'string',
|
|
||||||
'default' => 'froxlorlocal',
|
|
||||||
'save_method' => 'storeSettingField'
|
|
||||||
),
|
|
||||||
/*
|
|
||||||
* @TODO implement if phpfpm knows custom php.ini files
|
|
||||||
*
|
|
||||||
'system_phpfpm_defaultini_ownvhost' => array(
|
|
||||||
'label' => $lng['serversettings']['mod_fcgid']['defaultini_ownvhost'],
|
|
||||||
'settinggroup' => 'phpfpm',
|
|
||||||
'varname' => 'vhost_defaultini',
|
|
||||||
'type' => 'option',
|
|
||||||
'default' => '1',
|
|
||||||
'option_mode' => 'one',
|
|
||||||
'option_options_method' => 'getPhpConfigs',
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
),
|
|
||||||
*/
|
|
||||||
'system_phpfpm_configdir' => array(
|
|
||||||
'label' => $lng['serversettings']['phpfpm_settings']['configdir'],
|
|
||||||
'settinggroup' => 'phpfpm',
|
|
||||||
'varname' => 'configdir',
|
|
||||||
'type' => 'string',
|
|
||||||
'string_type' => 'dir',
|
|
||||||
'default' => '/etc/php-fpm.d/',
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
),
|
|
||||||
'system_phpfpm_tmpdir' => array(
|
|
||||||
'label' => $lng['serversettings']['mod_fcgid']['tmpdir'],
|
|
||||||
'settinggroup' => 'phpfpm',
|
|
||||||
'varname' => 'tmpdir',
|
|
||||||
'type' => 'string',
|
|
||||||
'string_type' => 'dir',
|
|
||||||
'default' => '/var/customers/tmp/',
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
),
|
|
||||||
'system_phpfpm_peardir' => array(
|
|
||||||
'label' => $lng['serversettings']['mod_fcgid']['peardir'],
|
|
||||||
'settinggroup' => 'phpfpm',
|
|
||||||
'varname' => 'peardir',
|
|
||||||
'type' => 'string',
|
|
||||||
'string_type' => 'dir',
|
|
||||||
'default' => '/usr/share/php/:/usr/share/php5/',
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
),
|
|
||||||
'system_phpfpm_reload' => array(
|
|
||||||
'label' => $lng['serversettings']['phpfpm_settings']['reload'],
|
|
||||||
'settinggroup' => 'phpfpm',
|
|
||||||
'varname' => 'reload',
|
|
||||||
'type' => 'string',
|
|
||||||
'default' => '/etc/init.d/php-fpm restart',
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
),
|
|
||||||
'system_phpfpm_pm' => array(
|
|
||||||
'label' => $lng['serversettings']['phpfpm_settings']['pm'],
|
|
||||||
'settinggroup' => 'phpfpm',
|
|
||||||
'varname' => 'pm',
|
|
||||||
'type' => 'option',
|
|
||||||
'default' => 'static',
|
|
||||||
'option_mode' => 'one',
|
|
||||||
'option_options' => array('static' => 'static', 'dynamic' => 'dynamic'),
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
),
|
|
||||||
'system_phpfpm_max_children' => array(
|
|
||||||
'label' => $lng['serversettings']['phpfpm_settings']['max_children'],
|
|
||||||
'settinggroup' => 'phpfpm',
|
|
||||||
'varname' => 'max_children',
|
|
||||||
'type' => 'int',
|
|
||||||
'default' => 1,
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
),
|
|
||||||
'system_phpfpm_start_servers' => array(
|
|
||||||
'label' => $lng['serversettings']['phpfpm_settings']['start_servers'],
|
|
||||||
'settinggroup' => 'phpfpm',
|
|
||||||
'varname' => 'start_servers',
|
|
||||||
'type' => 'int',
|
|
||||||
'default' => 20,
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
),
|
|
||||||
'system_phpfpm_min_spare_servers' => array(
|
|
||||||
'label' => $lng['serversettings']['phpfpm_settings']['min_spare_servers'],
|
|
||||||
'settinggroup' => 'phpfpm',
|
|
||||||
'varname' => 'min_spare_servers',
|
|
||||||
'type' => 'int',
|
|
||||||
'default' => 5,
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
),
|
|
||||||
'system_phpfpm_max_spare_servers' => array(
|
|
||||||
'label' => $lng['serversettings']['phpfpm_settings']['max_spare_servers'],
|
|
||||||
'settinggroup' => 'phpfpm',
|
|
||||||
'varname' => 'max_spare_servers',
|
|
||||||
'type' => 'int',
|
|
||||||
'default' => 35,
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
),
|
|
||||||
'system_phpfpm_max_requests' => array(
|
|
||||||
'label' => $lng['serversettings']['phpfpm_settings']['max_requests'],
|
|
||||||
'settinggroup' => 'phpfpm',
|
|
||||||
'varname' => 'max_requests',
|
|
||||||
'type' => 'int',
|
|
||||||
'default' => 0,
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -1,65 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This file is part of the Froxlor project.
|
|
||||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the COPYING
|
|
||||||
* file that was distributed with this source code. You can also view the
|
|
||||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
|
||||||
*
|
|
||||||
* @copyright (c) the authors
|
|
||||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
|
||||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
|
||||||
* @package Settings
|
|
||||||
* @version $Id$
|
|
||||||
*/
|
|
||||||
|
|
||||||
return array(
|
|
||||||
'groups' => array(
|
|
||||||
'perl' => array(
|
|
||||||
'title' => $lng['admin']['perl_settings'],
|
|
||||||
'fields' => array(
|
|
||||||
'perl_path' => array(
|
|
||||||
'label' => $lng['serversettings']['perl_path'],
|
|
||||||
'settinggroup' => 'system',
|
|
||||||
'varname' => 'perl_path',
|
|
||||||
'type' => 'string',
|
|
||||||
'default' => '/usr/bin/perl',
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
'websrv_avail' => array('lighttpd')
|
|
||||||
),
|
|
||||||
'system_perl_suexecworkaround' => array(
|
|
||||||
'label' => $lng['serversettings']['perl']['suexecworkaround'],
|
|
||||||
'settinggroup' => 'perl',
|
|
||||||
'varname' => 'suexecworkaround',
|
|
||||||
'type' => 'bool',
|
|
||||||
'default' => false,
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
'websrv_avail' => array('apache2')
|
|
||||||
),
|
|
||||||
'system_perl_suexeccgipath' => array(
|
|
||||||
'label' => $lng['serversettings']['perl']['suexeccgipath'],
|
|
||||||
'settinggroup' => 'perl',
|
|
||||||
'varname' => 'suexecpath',
|
|
||||||
'type' => 'string',
|
|
||||||
'string_type' => 'dir',
|
|
||||||
'default' => '/var/www/cgi-bin/',
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
'websrv_avail' => array('apache2')
|
|
||||||
),
|
|
||||||
'perl_server' => array(
|
|
||||||
'label' => $lng['serversettings']['perl_server'],
|
|
||||||
'settinggroup' => 'serversettings',
|
|
||||||
'varname' => 'perl_server',
|
|
||||||
'type' => 'string',
|
|
||||||
'default' => 'unix:/var/run/nginx/cgiwrap-dispatch.sock',
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
'websrv_avail' => array('nginx')
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -49,15 +49,6 @@ return array(
|
|||||||
'default' => '/usr/bin/',
|
'default' => '/usr/bin/',
|
||||||
'save_method' => 'storeSettingField',
|
'save_method' => 'storeSettingField',
|
||||||
),
|
),
|
||||||
'system_awstats_awstatspath' => array(
|
|
||||||
'label' => $lng['serversettings']['awstats_awstatspath'],
|
|
||||||
'settinggroup' => 'system',
|
|
||||||
'varname' => 'awstats_awstatspath',
|
|
||||||
'type' => 'string',
|
|
||||||
'string_type' => 'dir',
|
|
||||||
'default' => '/usr/bin/',
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
),
|
|
||||||
'system_awstats_conf' => array(
|
'system_awstats_conf' => array(
|
||||||
'label' => $lng['serversettings']['awstats_conf'],
|
'label' => $lng['serversettings']['awstats_conf'],
|
||||||
'settinggroup' => 'system',
|
'settinggroup' => 'system',
|
||||||
@@ -66,15 +57,6 @@ return array(
|
|||||||
'string_type' => 'dir',
|
'string_type' => 'dir',
|
||||||
'default' => '/etc/awstats/',
|
'default' => '/etc/awstats/',
|
||||||
'save_method' => 'storeSettingField',
|
'save_method' => 'storeSettingField',
|
||||||
),
|
|
||||||
'system_awstats_icons' => array(
|
|
||||||
'label' => $lng['serversettings']['awstats_icons'],
|
|
||||||
'settinggroup' => 'system',
|
|
||||||
'varname' => 'awstats_icons',
|
|
||||||
'type' => 'string',
|
|
||||||
'string_type' => 'dir',
|
|
||||||
'default' => '/usr/share/awstats/icon/',
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -59,21 +59,13 @@ return array(
|
|||||||
'default' => '',
|
'default' => '',
|
||||||
'save_method' => 'storeSettingField',
|
'save_method' => 'storeSettingField',
|
||||||
),
|
),
|
||||||
'system_dns_createmailentry' => array(
|
|
||||||
'label' => $lng['serversettings']['mail_also_with_mxservers'],
|
|
||||||
'settinggroup' => 'system',
|
|
||||||
'varname' => 'dns_createmailentry',
|
|
||||||
'type' => 'bool',
|
|
||||||
'default' => false,
|
|
||||||
'save_method' => 'storeSettingField'
|
|
||||||
),
|
|
||||||
'system_defaultttl' => array(
|
'system_defaultttl' => array(
|
||||||
'label' => $lng['serversettings']['defaultttl'],
|
'label' => $lng['serversettings']['defaultttl'],
|
||||||
'settinggroup' => 'system',
|
'settinggroup' => 'system',
|
||||||
'varname' => 'defaultttl',
|
'varname' => 'defaultttl',
|
||||||
'type' => 'int',
|
'type' => 'int',
|
||||||
'default' => 604800, /* 1 week */
|
'default' => 604800, /* 1 week */
|
||||||
'int_min' => 3600, /* 1 hour */
|
'int_min' => 86400, /* 1 day */
|
||||||
'int_max' => 2147483647, /* integer max */
|
'int_max' => 2147483647, /* integer max */
|
||||||
'save_method' => 'storeSettingField',
|
'save_method' => 'storeSettingField',
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -36,7 +36,6 @@ return array(
|
|||||||
'settinggroup' => 'dkim',
|
'settinggroup' => 'dkim',
|
||||||
'varname' => 'dkim_prefix',
|
'varname' => 'dkim_prefix',
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'string_type' => 'dir',
|
|
||||||
'default' => '/etc/postfix/dkim/',
|
'default' => '/etc/postfix/dkim/',
|
||||||
'save_method' => 'storeSettingField',
|
'save_method' => 'storeSettingField',
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -58,7 +58,6 @@ return array(
|
|||||||
'option_mode' => 'one',
|
'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'])),
|
'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',
|
'save_method' => 'storeSettingField',
|
||||||
'plausibility_check_method' => 'setCycleOfCronjob',
|
|
||||||
),
|
),
|
||||||
'ticket_concurrently_open' => array(
|
'ticket_concurrently_open' => array(
|
||||||
'label' => $lng['serversettings']['ticket']['concurrentlyopen'],
|
'label' => $lng['serversettings']['ticket']['concurrentlyopen'],
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ return array(
|
|||||||
'type' => 'option',
|
'type' => 'option',
|
||||||
'default' => '',
|
'default' => '',
|
||||||
'option_mode' => 'multiple',
|
'option_mode' => 'multiple',
|
||||||
'option_options' => array('gd' => 'GD Library', 'pcre' => 'PCRE', 'ioncube' => 'ionCube', 'ioncube loader' => 'ionCube Loader', 'curl' => 'curl', 'mcrypt' => 'mcrypt', 'imap' => 'imap', 'json' => 'json', 'ldap' => 'LDAP', 'hash' => 'hash', 'mbstring' => 'mbstring'),
|
'option_options' => array('gd' => 'GD Library', 'pcre' => 'PCRE', 'ioncube' => 'ionCube', 'ioncube loader' => 'ionCube Loader', 'curl' => 'curl', 'mcrypt' => 'mcrypt', 'imap' => 'imap'),
|
||||||
'save_method' => 'storeSettingApsPhpExtensions',
|
'save_method' => 'storeSettingApsPhpExtensions',
|
||||||
),
|
),
|
||||||
'aps_php-function' => array(
|
'aps_php-function' => array(
|
||||||
|
|||||||
@@ -38,6 +38,78 @@ return array(
|
|||||||
'default' => true,
|
'default' => true,
|
||||||
'save_method' => 'storeSettingField',
|
'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',
|
||||||
|
),
|
||||||
|
'system_mod_fcgid_defaultini' => array(
|
||||||
|
'label' => $lng['serversettings']['mod_fcgid']['defaultini'],
|
||||||
|
'settinggroup' => 'system',
|
||||||
|
'varname' => 'mod_fcgid_defaultini',
|
||||||
|
'type' => 'option',
|
||||||
|
'default' => '1',
|
||||||
|
'option_mode' => 'one',
|
||||||
|
'option_options_method' => 'getPhpConfigs',
|
||||||
|
'save_method' => 'storeSettingField',
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -1,106 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This file is part of the Froxlor project.
|
|
||||||
* Copyright (c) 2003-2009 the SysCP Team (see authors).
|
|
||||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the COPYING
|
|
||||||
* file that was distributed with this source code. You can also view the
|
|
||||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
|
||||||
*
|
|
||||||
* @copyright (c) the authors
|
|
||||||
* @author Florian Lippert <flo@syscp.org> (2003-2009)
|
|
||||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
|
||||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
|
||||||
* @package Settings
|
|
||||||
* @version $Id: 215.backup.php 1 2010-09-14 08:09:17Z monotek $
|
|
||||||
*/
|
|
||||||
|
|
||||||
return array(
|
|
||||||
'groups' => array(
|
|
||||||
'backup' => array(
|
|
||||||
'title' => $lng['backup'],
|
|
||||||
'fields' => array(
|
|
||||||
'backup_enabled' => array(
|
|
||||||
'label' => $lng['serversettings']['backup_enabled'],
|
|
||||||
'settinggroup' => 'system',
|
|
||||||
'varname' => 'backup_enabled',
|
|
||||||
'type' => 'bool',
|
|
||||||
'default' => false,
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
'overview_option' => true
|
|
||||||
),
|
|
||||||
'backup_dir' => array(
|
|
||||||
'label' => $lng['serversettings']['backupdir']['description'],
|
|
||||||
'settinggroup' => 'system',
|
|
||||||
'varname' => 'backup_dir',
|
|
||||||
'type' => 'string',
|
|
||||||
'default' => '#froxlor_backup',
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
),
|
|
||||||
'backup_mysqldump_path' => array(
|
|
||||||
'label' => $lng['serversettings']['mysqldump_path']['description'],
|
|
||||||
'settinggroup' => 'system',
|
|
||||||
'varname' => 'backup_mysqldump_path',
|
|
||||||
'type' => 'string',
|
|
||||||
'default' => '/usr/bin/mysqldump',
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
),
|
|
||||||
'backup_count' => array(
|
|
||||||
'label' => $lng['serversettings']['backup_count'],
|
|
||||||
'settinggroup' => 'system',
|
|
||||||
'varname' => 'backup_count',
|
|
||||||
'type' => 'bool',
|
|
||||||
'default' => 'true',
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
'overview_option' => false
|
|
||||||
),
|
|
||||||
'backup_bigfile' => array(
|
|
||||||
'label' => $lng['serversettings']['backup_bigfile'],
|
|
||||||
'settinggroup' => 'system',
|
|
||||||
'varname' => 'backup_bigfile',
|
|
||||||
'type' => 'bool',
|
|
||||||
'default' => false,
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
'overview_option' => false
|
|
||||||
),
|
|
||||||
'backup_ftp_enabled_' => array(
|
|
||||||
'label' => $lng['serversettings']['backup_ftp_enabled'],
|
|
||||||
'settinggroup' => 'system',
|
|
||||||
'varname' => 'backup_ftp_enabled',
|
|
||||||
'type' => 'bool',
|
|
||||||
'default' => false,
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
'overview_option' => false
|
|
||||||
),
|
|
||||||
'backup_server' => array(
|
|
||||||
'label' => $lng['serversettings']['backup_ftp_server'],
|
|
||||||
'settinggroup' => 'system',
|
|
||||||
'varname' => 'backup_ftp_server',
|
|
||||||
'type' => 'string',
|
|
||||||
'default' => '',
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
),
|
|
||||||
'backup_user' => array(
|
|
||||||
'label' => $lng['serversettings']['backup_ftp_user'],
|
|
||||||
'settinggroup' => 'system',
|
|
||||||
'varname' => 'backup_ftp_user',
|
|
||||||
'type' => 'string',
|
|
||||||
'default' => '',
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
),
|
|
||||||
'backup_pass' => array(
|
|
||||||
'label' => $lng['serversettings']['backup_ftp_pass'],
|
|
||||||
'settinggroup' => 'system',
|
|
||||||
'varname' => 'backup_ftp_pass',
|
|
||||||
'type' => 'string',
|
|
||||||
'default' => '',
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
?>
|
|
||||||
198
admin_admins.php
@@ -14,7 +14,7 @@
|
|||||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||||
* @package Panel
|
* @package Panel
|
||||||
* @version $Id: admin_admins.php 101 2010-12-08 07:03:42Z d00p $
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
define('AREA', 'admin');
|
define('AREA', 'admin');
|
||||||
@@ -47,7 +47,6 @@ if($page == 'admins'
|
|||||||
'diskspace_used' => $lng['customer']['diskspace'] . ' (' . $lng['panel']['used'] . ')',
|
'diskspace_used' => $lng['customer']['diskspace'] . ' (' . $lng['panel']['used'] . ')',
|
||||||
'traffic' => $lng['customer']['traffic'],
|
'traffic' => $lng['customer']['traffic'],
|
||||||
'traffic_used' => $lng['customer']['traffic'] . ' (' . $lng['panel']['used'] . ')',
|
'traffic_used' => $lng['customer']['traffic'] . ' (' . $lng['panel']['used'] . ')',
|
||||||
/*
|
|
||||||
'mysqls' => $lng['customer']['mysqls'],
|
'mysqls' => $lng['customer']['mysqls'],
|
||||||
'mysqls_used' => $lng['customer']['mysqls'] . ' (' . $lng['panel']['used'] . ')',
|
'mysqls_used' => $lng['customer']['mysqls'] . ' (' . $lng['panel']['used'] . ')',
|
||||||
'ftps' => $lng['customer']['ftps'],
|
'ftps' => $lng['customer']['ftps'],
|
||||||
@@ -64,9 +63,6 @@ if($page == 'admins'
|
|||||||
'email_forwarders_used' => $lng['customer']['forwarders'] . ' (' . $lng['panel']['used'] . ')',
|
'email_forwarders_used' => $lng['customer']['forwarders'] . ' (' . $lng['panel']['used'] . ')',
|
||||||
'email_quota' => $lng['customer']['email_quota'],
|
'email_quota' => $lng['customer']['email_quota'],
|
||||||
'email_quota_used' => $lng['customer']['email_quota'] . ' (' . $lng['panel']['used'] . ')',
|
'email_quota_used' => $lng['customer']['email_quota'] . ' (' . $lng['panel']['used'] . ')',
|
||||||
'email_autoresponder' => $lng['customer']['autoresponder'],
|
|
||||||
'email_autoresponder_used' => $lng['customer']['autoresponder'] . ' (' . $lng['panel']['used'] . ')',
|
|
||||||
*/
|
|
||||||
'deactivated' => $lng['admin']['deactivated']
|
'deactivated' => $lng['admin']['deactivated']
|
||||||
);
|
);
|
||||||
$paging = new paging($userinfo, $db, TABLE_PANEL_ADMINS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
|
$paging = new paging($userinfo, $db, TABLE_PANEL_ADMINS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
|
||||||
@@ -88,20 +84,7 @@ if($page == 'admins'
|
|||||||
$row['traffic'] = round($row['traffic'] / (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_used'] = round($row['diskspace_used'] / 1024, $settings['panel']['decimal_places']);
|
||||||
$row['diskspace'] = round($row['diskspace'] / 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');
|
||||||
/**
|
|
||||||
* percent-values for progressbar
|
|
||||||
*/
|
|
||||||
if($row['diskspace'] > 0) {
|
|
||||||
$percent = round(($row['diskspace_used']*100)/$row['diskspace'], 2);
|
|
||||||
$doublepercent = round($percent*2, 2);
|
|
||||||
} else {
|
|
||||||
$percent = 0;
|
|
||||||
$doublepercent = 0;
|
|
||||||
}
|
|
||||||
/* */
|
|
||||||
|
|
||||||
$row = str_replace_array('-1', 'UL', $row, 'customers domains diskspace traffic mysqls emails email_accounts email_forwarders email_quota email_autoresponder ftps subdomains tickets');
|
|
||||||
$row = htmlentities_array($row);
|
$row = htmlentities_array($row);
|
||||||
eval("\$admins.=\"" . getTemplate("admins/admins_admin") . "\";");
|
eval("\$admins.=\"" . getTemplate("admins/admins_admin") . "\";");
|
||||||
$count++;
|
$count++;
|
||||||
@@ -110,7 +93,6 @@ if($page == 'admins'
|
|||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
$admincount = $db->num_rows($result);
|
|
||||||
eval("echo \"" . getTemplate("admins/admins") . "\";");
|
eval("echo \"" . getTemplate("admins/admins") . "\";");
|
||||||
}
|
}
|
||||||
elseif($action == 'su')
|
elseif($action == 'su')
|
||||||
@@ -230,20 +212,6 @@ if($page == 'admins'
|
|||||||
$email_quota = - 1;
|
$email_quota = - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($settings['autoresponder']['autoresponder_active'] == '1')
|
|
||||||
{
|
|
||||||
$email_autoresponder = intval_ressource($_POST['email_autoresponder']);
|
|
||||||
|
|
||||||
if(isset($_POST['email_autoresponder_ul']))
|
|
||||||
{
|
|
||||||
$email_autoresponder = - 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$email_autoresponder = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
$ftps = intval_ressource($_POST['ftps']);
|
$ftps = intval_ressource($_POST['ftps']);
|
||||||
|
|
||||||
if(isset($_POST['ftps_ul']))
|
if(isset($_POST['ftps_ul']))
|
||||||
@@ -251,18 +219,12 @@ if($page == 'admins'
|
|||||||
$ftps = - 1;
|
$ftps = - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($settings['ticket']['enabled'] == 1)
|
$tickets = intval_ressource($_POST['tickets']);
|
||||||
{
|
|
||||||
$tickets = intval_ressource($_POST['tickets']);
|
|
||||||
|
|
||||||
if(isset($_POST['tickets_ul']))
|
if(isset($_POST['tickets_ul'])
|
||||||
{
|
&& $settings['ticket']['enabled'] == '1')
|
||||||
$tickets = - 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
$tickets = 0;
|
$tickets = - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$mysqls = intval_ressource($_POST['mysqls']);
|
$mysqls = intval_ressource($_POST['mysqls']);
|
||||||
@@ -289,21 +251,10 @@ if($page == 'admins'
|
|||||||
$can_manage_aps_packages = 0;
|
$can_manage_aps_packages = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$customers_see_all = 0;
|
$customers_see_all = intval($_POST['customers_see_all']);
|
||||||
if(isset($_POST['customers_see_all']))
|
$domains_see_all = intval($_POST['domains_see_all']);
|
||||||
$customers_see_all = intval($_POST['customers_see_all']);
|
$caneditphpsettings = intval($_POST['caneditphpsettings']);
|
||||||
|
$change_serversettings = intval($_POST['change_serversettings']);
|
||||||
$domains_see_all = 0;
|
|
||||||
if(isset($_POST['domains_see_all']))
|
|
||||||
$domains_see_all = intval($_POST['domains_see_all']);
|
|
||||||
|
|
||||||
$caneditphpsettings = 0;
|
|
||||||
if(isset($_POST['caneditphpsettings']))
|
|
||||||
$caneditphpsettings = intval($_POST['caneditphpsettings']);
|
|
||||||
|
|
||||||
$change_serversettings = 0;
|
|
||||||
if(isset($_POST['change_serversettings']))
|
|
||||||
$change_serversettings = intval($_POST['change_serversettings']);
|
|
||||||
|
|
||||||
$diskspace = intval_ressource($_POST['diskspace']);
|
$diskspace = intval_ressource($_POST['diskspace']);
|
||||||
|
|
||||||
@@ -386,38 +337,8 @@ if($page == 'admins'
|
|||||||
$change_serversettings = '0';
|
$change_serversettings = '0';
|
||||||
}
|
}
|
||||||
|
|
||||||
$_theme = $settings['panel']['default_theme'];
|
$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 . ")");
|
||||||
$result = $db->query("INSERT INTO
|
|
||||||
`" . TABLE_PANEL_ADMINS . "`
|
|
||||||
SET
|
|
||||||
`loginname` = '" . $db->escape($loginname) . "',
|
|
||||||
`password` = '" . md5($password) . "',
|
|
||||||
`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 . "',
|
|
||||||
`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 . "',
|
|
||||||
`can_manage_aps_packages` = '" . (int)$can_manage_aps_packages . "',
|
|
||||||
`aps_packages` = '" . (int)$number_of_aps_packages . "',
|
|
||||||
`email_autoresponder` = '" . $db->escape($email_autoresponder) . "',
|
|
||||||
`theme` = '".$db->escape($_theme)."';
|
|
||||||
");
|
|
||||||
$adminid = $db->insert_id();
|
$adminid = $db->insert_id();
|
||||||
$log->logAction(ADM_ACTION, LOG_INFO, "added admin '" . $loginname . "'");
|
$log->logAction(ADM_ACTION, LOG_INFO, "added admin '" . $loginname . "'");
|
||||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||||
@@ -459,23 +380,16 @@ if($page == 'admins'
|
|||||||
$email_accounts_ul = makecheckbox('email_accounts_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_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);
|
$email_quota_ul = makecheckbox('email_quota_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||||
$email_autoresponder_ul = makecheckbox('email_autoresponder_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
|
||||||
$ftps_ul = makecheckbox('ftps_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);
|
$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);
|
$mysqls_ul = makecheckbox('mysqls_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||||
#$change_serversettings = makeyesno('change_serversettings', '1', '0', '0');
|
$change_serversettings = makeyesno('change_serversettings', '1', '0', '0');
|
||||||
#$customers_see_all = makeyesno('customers_see_all', '1', '0', '0');
|
$customers_see_all = makeyesno('customers_see_all', '1', '0', '0');
|
||||||
#$domains_see_all = makeyesno('domains_see_all', '1', '0', '0');
|
$domains_see_all = makeyesno('domains_see_all', '1', '0', '0');
|
||||||
#$caneditphpsettings = makeyesno('caneditphpsettings', '1', '0', '0');
|
$caneditphpsettings = makeyesno('caneditphpsettings', '1', '0', '0');
|
||||||
#$can_manage_aps_packages = makeyesno('can_manage_aps_packages', '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);
|
$number_of_aps_packages_ul = makecheckbox('number_of_aps_packages_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||||
|
|
||||||
$admin_add_data = include_once dirname(__FILE__).'/lib/formfields/admin/admin/formfield.admin_add.php';
|
|
||||||
$admin_add_form = htmlform::genHTMLForm($admin_add_data);
|
|
||||||
|
|
||||||
$title = $admin_add_data['admin_add']['title'];
|
|
||||||
$image = $admin_add_data['admin_add']['image'];
|
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("admins/admins_add") . "\";");
|
eval("echo \"" . getTemplate("admins/admins_add") . "\";");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -504,7 +418,6 @@ if($page == 'admins'
|
|||||||
$email_accounts = $result['email_accounts'];
|
$email_accounts = $result['email_accounts'];
|
||||||
$email_forwarders = $result['email_forwarders'];
|
$email_forwarders = $result['email_forwarders'];
|
||||||
$email_quota = $result['email_quota'];
|
$email_quota = $result['email_quota'];
|
||||||
$email_autoresponder = $result['email_autoresponder'];
|
|
||||||
$ftps = $result['ftps'];
|
$ftps = $result['ftps'];
|
||||||
$tickets = $result['tickets'];
|
$tickets = $result['tickets'];
|
||||||
$mysqls = $result['mysqls'];
|
$mysqls = $result['mysqls'];
|
||||||
@@ -579,39 +492,18 @@ if($page == 'admins'
|
|||||||
$email_quota = - 1;
|
$email_quota = - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($settings['autoresponder']['autoresponder_active'] == '1')
|
|
||||||
{
|
|
||||||
$email_autoresponder = intval_ressource($_POST['email_autoresponder']);
|
|
||||||
|
|
||||||
if(isset($_POST['email_autoresponder_ul']))
|
|
||||||
{
|
|
||||||
$email_autoresponder = - 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$email_autoresponder = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
$ftps = intval_ressource($_POST['ftps']);
|
$ftps = intval_ressource($_POST['ftps']);
|
||||||
|
|
||||||
if(isset($_POST['ftps_ul']))
|
if(isset($_POST['ftps_ul']))
|
||||||
{
|
{
|
||||||
$ftps = - 1;
|
$ftps = - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($settings['ticket']['enabled'] == 1)
|
|
||||||
{
|
|
||||||
$tickets = intval_ressource($_POST['tickets']);
|
|
||||||
|
|
||||||
if(isset($_POST['tickets_ul']))
|
$tickets = intval_ressource($_POST['tickets']);
|
||||||
{
|
|
||||||
$tickets = - 1;
|
if(isset($_POST['tickets_ul']))
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
$tickets = 0;
|
$tickets = - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$mysqls = intval_ressource($_POST['mysqls']);
|
$mysqls = intval_ressource($_POST['mysqls']);
|
||||||
@@ -628,24 +520,12 @@ if($page == 'admins'
|
|||||||
$number_of_aps_packages = - 1;
|
$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']);
|
$can_manage_aps_packages = intval($_POST['can_manage_aps_packages']);
|
||||||
|
|
||||||
$customers_see_all = 0;
|
|
||||||
if(isset($_POST['customers_see_all']))
|
|
||||||
$customers_see_all = intval($_POST['customers_see_all']);
|
|
||||||
|
|
||||||
$domains_see_all = 0;
|
|
||||||
if(isset($_POST['domains_see_all']))
|
|
||||||
$domains_see_all = intval($_POST['domains_see_all']);
|
|
||||||
|
|
||||||
$caneditphpsettings = 0;
|
|
||||||
if(isset($_POST['caneditphpsettings']))
|
|
||||||
$caneditphpsettings = intval($_POST['caneditphpsettings']);
|
|
||||||
|
|
||||||
$change_serversettings = 0;
|
|
||||||
if(isset($_POST['change_serversettings']))
|
|
||||||
$change_serversettings = intval($_POST['change_serversettings']);
|
|
||||||
|
|
||||||
$diskspace = intval($_POST['diskspace']);
|
$diskspace = intval($_POST['diskspace']);
|
||||||
|
|
||||||
if(isset($_POST['diskspace_ul']))
|
if(isset($_POST['diskspace_ul']))
|
||||||
@@ -714,7 +594,7 @@ if($page == 'admins'
|
|||||||
$change_serversettings = '0';
|
$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) . "', `email_autoresponder`='" . $db->escape($email_autoresponder) . "', `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) . "'");
|
$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 . "'");
|
$log->logAction(ADM_ACTION, LOG_INFO, "edited admin '#" . $id . "'");
|
||||||
$redirect_props = Array(
|
$redirect_props = Array(
|
||||||
'page' => $page,
|
'page' => $page,
|
||||||
@@ -792,13 +672,6 @@ if($page == 'admins'
|
|||||||
$result['email_quota'] = '';
|
$result['email_quota'] = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$email_autoresponder_ul = makecheckbox('email_autoresponder_ul', $lng['customer']['unlimited'], '-1', false, $result['email_autoresponder'], true, true);
|
|
||||||
|
|
||||||
if($result['email_autoresponder'] == '-1')
|
|
||||||
{
|
|
||||||
$result['email_autoresponder'] = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
$ftps_ul = makecheckbox('ftps_ul', $lng['customer']['unlimited'], '-1', false, $result['ftps'], true, true);
|
$ftps_ul = makecheckbox('ftps_ul', $lng['customer']['unlimited'], '-1', false, $result['ftps'], true, true);
|
||||||
|
|
||||||
if($result['ftps'] == '-1')
|
if($result['ftps'] == '-1')
|
||||||
@@ -852,21 +725,14 @@ if($page == 'admins'
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#$change_serversettings = makeyesno('change_serversettings', '1', '0', $result['change_serversettings']);
|
$change_serversettings = makeyesno('change_serversettings', '1', '0', $result['change_serversettings']);
|
||||||
#$customers_see_all = makeyesno('customers_see_all', '1', '0', $result['customers_see_all']);
|
$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']);
|
$domains_see_all = makeyesno('domains_see_all', '1', '0', $result['domains_see_all']);
|
||||||
#$caneditphpsettings = makeyesno('caneditphpsettings', '1', '0', $result['caneditphpsettings']);
|
$caneditphpsettings = makeyesno('caneditphpsettings', '1', '0', $result['caneditphpsettings']);
|
||||||
#$deactivated = makeyesno('deactivated', '1', '0', $result['deactivated']);
|
$deactivated = makeyesno('deactivated', '1', '0', $result['deactivated']);
|
||||||
#$can_manage_aps_packages = makeyesno('can_manage_aps_packages', '1', '0', $result['can_manage_aps_packages']);
|
$can_manage_aps_packages = makeyesno('can_manage_aps_packages', '1', '0', $result['can_manage_aps_packages']);
|
||||||
|
|
||||||
$result = htmlentities_array($result);
|
$result = htmlentities_array($result);
|
||||||
|
|
||||||
$admin_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/admin/formfield.admin_edit.php';
|
|
||||||
$admin_edit_form = htmlform::genHTMLForm($admin_edit_data);
|
|
||||||
|
|
||||||
$title = $admin_edit_data['admin_edit']['title'];
|
|
||||||
$image = $admin_edit_data['admin_edit']['image'];
|
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("admins/admins_edit") . "\";");
|
eval("echo \"" . getTemplate("admins/admins_edit") . "\";");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -96,9 +96,8 @@ if($userinfo['change_serversettings'] == '1')
|
|||||||
'<VIRTUAL_UID_MAPS>' => $settings['system']['vmail_uid'],
|
'<VIRTUAL_UID_MAPS>' => $settings['system']['vmail_uid'],
|
||||||
'<VIRTUAL_GID_MAPS>' => $settings['system']['vmail_gid'],
|
'<VIRTUAL_GID_MAPS>' => $settings['system']['vmail_gid'],
|
||||||
'<SSLPROTOCOLS>' => ($settings['system']['use_ssl'] == '1') ? 'imaps pop3s' : '',
|
'<SSLPROTOCOLS>' => ($settings['system']['use_ssl'] == '1') ? 'imaps pop3s' : '',
|
||||||
'<CUSTOMER_TMP>' => ($settings['system']['mod_fcgid_tmpdir'] != '') ? makeCorrectDir($settings['system']['mod_fcgid_tmpdir']) : '/tmp/',
|
'<REALTIME_PORT>' => $settings['system']['realtime_port'],
|
||||||
'<BASE_PATH>' => makeCorrectDir(dirname(__FILE__)),
|
'<CUSTOMER_TMP>' => ($settings['system']['mod_fcgid_tmpdir'] != '') ? makeCorrectDir($settings['system']['mod_fcgid_tmpdir']) : '/tmp/'
|
||||||
'<BIND_CONFIG_PATH>' => makeCorrectDir($settings['system']['bindconf_directory'])
|
|
||||||
);
|
);
|
||||||
$files = '';
|
$files = '';
|
||||||
$configpage = '';
|
$configpage = '';
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||||
* @package Panel
|
* @package Panel
|
||||||
* @version $Id: admin_cronjobs.php 105 2010-12-09 08:02:33Z d00p $
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
define('AREA', 'admin');
|
define('AREA', 'admin');
|
||||||
@@ -121,7 +121,7 @@ if($page == 'cronjobs'
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#$isactive = makeyesno('isactive', '1', '0', $result['isactive']);
|
$isactive = makeyesno('isactive', '1', '0', $result['isactive']);
|
||||||
// interval
|
// interval
|
||||||
$interval_nfo = explode(' ', $result['interval']);
|
$interval_nfo = explode(' ', $result['interval']);
|
||||||
$interval_value = $interval_nfo[0];
|
$interval_value = $interval_nfo[0];
|
||||||
@@ -140,13 +140,7 @@ if($page == 'cronjobs'
|
|||||||
{
|
{
|
||||||
$change_cronfile = true;
|
$change_cronfile = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$cronjobs_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/cronjobs/formfield.cronjobs_edit.php';
|
|
||||||
$cronjobs_edit_form = htmlform::genHTMLForm($cronjobs_edit_data);
|
|
||||||
|
|
||||||
$title = $cronjobs_edit_data['cronjobs_edit']['title'];
|
|
||||||
$image = $cronjobs_edit_data['cronjobs_edit']['image'];
|
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("cronjobs/cronjob_edit") . "\";");
|
eval("echo \"" . getTemplate("cronjobs/cronjob_edit") . "\";");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,9 +40,6 @@ if($page == 'customers'
|
|||||||
{
|
{
|
||||||
if($action == '')
|
if($action == '')
|
||||||
{
|
{
|
||||||
// clear request data
|
|
||||||
unset($_SESSION['requestData']);
|
|
||||||
|
|
||||||
$log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_customers");
|
$log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_customers");
|
||||||
$fields = array(
|
$fields = array(
|
||||||
'c.loginname' => $lng['login']['username'],
|
'c.loginname' => $lng['login']['username'],
|
||||||
@@ -54,8 +51,6 @@ if($page == 'customers'
|
|||||||
'c.diskspace_used' => $lng['customer']['diskspace'] . ' (' . $lng['panel']['used'] . ')',
|
'c.diskspace_used' => $lng['customer']['diskspace'] . ' (' . $lng['panel']['used'] . ')',
|
||||||
'c.traffic' => $lng['customer']['traffic'],
|
'c.traffic' => $lng['customer']['traffic'],
|
||||||
'c.traffic_used' => $lng['customer']['traffic'] . ' (' . $lng['panel']['used'] . ')',
|
'c.traffic_used' => $lng['customer']['traffic'] . ' (' . $lng['panel']['used'] . ')',
|
||||||
'c.backup_allowed' => $lng['backup_allowed']
|
|
||||||
/*
|
|
||||||
'c.mysqls' => $lng['customer']['mysqls'],
|
'c.mysqls' => $lng['customer']['mysqls'],
|
||||||
'c.mysqls_used' => $lng['customer']['mysqls'] . ' (' . $lng['panel']['used'] . ')',
|
'c.mysqls_used' => $lng['customer']['mysqls'] . ' (' . $lng['panel']['used'] . ')',
|
||||||
'c.ftps' => $lng['customer']['ftps'],
|
'c.ftps' => $lng['customer']['ftps'],
|
||||||
@@ -72,28 +67,18 @@ if($page == 'customers'
|
|||||||
'c.email_quota_used' => $lng['customer']['email_quota'] . ' (' . $lng['panel']['used'] . ')',
|
'c.email_quota_used' => $lng['customer']['email_quota'] . ' (' . $lng['panel']['used'] . ')',
|
||||||
'c.deactivated' => $lng['admin']['deactivated'],
|
'c.deactivated' => $lng['admin']['deactivated'],
|
||||||
'c.lastlogin_succ' => $lng['admin']['lastlogin_succ'],
|
'c.lastlogin_succ' => $lng['admin']['lastlogin_succ'],
|
||||||
'c.phpenabled' => $lng['admin']['phpenabled'],
|
'c.phpenabled' => $lng['admin']['phpenabled']
|
||||||
'c.perlenabled' => $lng['admin']['perlenabled']
|
|
||||||
*/
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/*
|
|
||||||
if($settings['ticket']['enabled'] == 1)
|
if($settings['ticket']['enabled'] == 1)
|
||||||
{
|
{
|
||||||
$fields['c.tickets'] = $lng['customer']['tickets'];
|
$fields['c.tickets'] = $lng['customer']['tickets'];
|
||||||
$fields['c.tickets_used'] = $lng['customer']['tickets'] . ' (' . $lng['panel']['used'] . ')';
|
$fields['c.tickets_used'] = $lng['customer']['tickets'] . ' (' . $lng['panel']['used'] . ')';
|
||||||
}
|
}
|
||||||
|
|
||||||
if($settings['autoresponder']['autoresponder_active'] == 1)
|
|
||||||
{
|
|
||||||
$fields['c.email_autoresponder'] = $lng['customer']['autoresponder'];
|
|
||||||
$fields['c.email_autoresponder_used'] = $lng['customer']['autoresponder'] . ' (' . $lng['panel']['used'] . ')';
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
$paging = new paging($userinfo, $db, TABLE_PANEL_CUSTOMERS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
|
$paging = new paging($userinfo, $db, TABLE_PANEL_CUSTOMERS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
|
||||||
$customers = '';
|
$customers = '';
|
||||||
$result = $db->query("SELECT `c`.*, `a`.`loginname` AS `adminname` " . "FROM `" . TABLE_PANEL_CUSTOMERS . "` `c`, `" . TABLE_PANEL_ADMINS . "` `a` " . "WHERE " . ($userinfo['customers_see_all'] ? '' : " `c`.`adminid` = '" . (int)$userinfo['adminid'] . "' AND ") . "`c`.`adminid`=`a`.`adminid` " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy(false) . " " . $paging->getSqlLimit());
|
$result = $db->query("SELECT `c`.*, `a`.`loginname` AS `adminname` " . "FROM `" . TABLE_PANEL_CUSTOMERS . "` `c`, `" . TABLE_PANEL_ADMINS . "` `a` " . "WHERE " . ($userinfo['customers_see_all'] ? '' : " `c`.`adminid` = '" . (int)$userinfo['adminid'] . "' AND ") . "`c`.`adminid`=`a`.`adminid` " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
|
||||||
$paging->setEntries($db->num_rows($result));
|
$paging->setEntries($db->num_rows($result));
|
||||||
$sortcode = $paging->getHtmlSortCode($lng, true);
|
$sortcode = $paging->getHtmlSortCode($lng, true);
|
||||||
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
|
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
|
||||||
@@ -114,27 +99,14 @@ if($page == 'customers'
|
|||||||
$row['diskspace'] = round($row['diskspace'] / 1024, $settings['panel']['decimal_places']);
|
$row['diskspace'] = round($row['diskspace'] / 1024, $settings['panel']['decimal_places']);
|
||||||
$last_login = ((int)$row['lastlogin_succ'] == 0) ? $lng['panel']['neverloggedin'] : date('d.m.Y', $row['lastlogin_succ']);
|
$last_login = ((int)$row['lastlogin_succ'] == 0) ? $lng['panel']['neverloggedin'] : date('d.m.Y', $row['lastlogin_succ']);
|
||||||
|
|
||||||
/**
|
|
||||||
* percent-values for progressbar
|
|
||||||
*/
|
|
||||||
if ($row['diskspace'] > 0) {
|
|
||||||
$percent = round(($row['diskspace_used']*100)/$row['diskspace'], 2);
|
|
||||||
$doublepercent = round($percent*2, 2);
|
|
||||||
} else {
|
|
||||||
$percent = 0;
|
|
||||||
$doublepercent = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
$column_style = '';
|
$column_style = '';
|
||||||
$unlock_link = '';
|
|
||||||
if($row['loginfail_count'] >= $settings['login']['maxloginattempts']
|
if($row['loginfail_count'] >= $settings['login']['maxloginattempts']
|
||||||
&& $row['lastlogin_fail'] > (time() - $settings['login']['deactivatetime'])
|
&& $row['lastlogin_fail'] > (time() - $settings['login']['deactivatetime'])
|
||||||
) {
|
) {
|
||||||
$column_style = ' style="background-color: #f99122;"';
|
$column_style = ' style="background-color: #f99122;"';
|
||||||
$unlock_link = '<a href="'.$filename.'?s='.$s.'&page='.$page.'&action=unlock&id='.$row['customerid'].'">'.$lng['panel']['unlock'].'</a><br />';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$row = str_replace_array('-1', 'UL', $row, 'diskspace traffic mysqls emails email_accounts email_forwarders ftps tickets subdomains email_autoresponder');
|
$row = str_replace_array('-1', 'UL', $row, 'diskspace traffic mysqls emails email_accounts email_forwarders ftps tickets subdomains');
|
||||||
$row = htmlentities_array($row);
|
$row = htmlentities_array($row);
|
||||||
eval("\$customers.=\"" . getTemplate("customers/customers_customer") . "\";");
|
eval("\$customers.=\"" . getTemplate("customers/customers_customer") . "\";");
|
||||||
$count++;
|
$count++;
|
||||||
@@ -143,7 +115,6 @@ if($page == 'customers'
|
|||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
$customercount = $db->num_rows($result);
|
|
||||||
eval("echo \"" . getTemplate("customers/customers") . "\";");
|
eval("echo \"" . getTemplate("customers/customers") . "\";");
|
||||||
}
|
}
|
||||||
elseif($action == 'su'
|
elseif($action == 'su'
|
||||||
@@ -165,31 +136,6 @@ if($page == 'customers'
|
|||||||
redirectTo('index.php', Array('action' => 'login'));
|
redirectTo('index.php', Array('action' => 'login'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elseif($action == 'unlock'
|
|
||||||
&& $id != 0)
|
|
||||||
{
|
|
||||||
$result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_CUSTOMERS . "` WHERE `customerid`='" . (int)$id . "' " . ($userinfo['customers_see_all'] ? '' : " AND `adminid` = '" . $db->escape($userinfo['adminid']) . "' "));
|
|
||||||
|
|
||||||
if($result['loginname'] != '')
|
|
||||||
{
|
|
||||||
if(isset($_POST['send'])
|
|
||||||
&& $_POST['send'] == 'send')
|
|
||||||
{
|
|
||||||
$result = $db->query("UPDATE
|
|
||||||
`" . TABLE_PANEL_CUSTOMERS . "`
|
|
||||||
SET
|
|
||||||
`loginfail_count` = '0'
|
|
||||||
WHERE
|
|
||||||
`customerid`= '" . (int)$id . "'"
|
|
||||||
);
|
|
||||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ask_yesno('customer_reallyunlock', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $result['loginname']);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
elseif($action == 'delete'
|
elseif($action == 'delete'
|
||||||
&& $id != 0)
|
&& $id != 0)
|
||||||
{
|
{
|
||||||
@@ -234,39 +180,18 @@ if($page == 'customers'
|
|||||||
$db->query("DELETE FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid`='" . (int)$id . "'");
|
$db->query("DELETE FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid`='" . (int)$id . "'");
|
||||||
$domains_deleted = $db->affected_rows();
|
$domains_deleted = $db->affected_rows();
|
||||||
$db->query("DELETE FROM `" . TABLE_PANEL_HTPASSWDS . "` WHERE `customerid`='" . (int)$id . "'");
|
$db->query("DELETE FROM `" . TABLE_PANEL_HTPASSWDS . "` WHERE `customerid`='" . (int)$id . "'");
|
||||||
$db->query("DELETE FROM `" . TABLE_PANEL_HTACCESS . "` WHERE `customerid`='" . (int)$id . "'");
|
|
||||||
$db->query("DELETE FROM `" . TABLE_PANEL_SESSIONS . "` WHERE `userid`='" . (int)$id . "' AND `adminsession` = '0'");
|
$db->query("DELETE FROM `" . TABLE_PANEL_SESSIONS . "` WHERE `userid`='" . (int)$id . "' AND `adminsession` = '0'");
|
||||||
$db->query("DELETE FROM `" . TABLE_PANEL_TRAFFIC . "` WHERE `customerid`='" . (int)$id . "'");
|
$db->query("DELETE FROM `" . TABLE_PANEL_TRAFFIC . "` WHERE `customerid`='" . (int)$id . "'");
|
||||||
$db->query("DELETE FROM `" . TABLE_MAIL_USERS . "` WHERE `customerid`='" . (int)$id . "'");
|
$db->query("DELETE FROM `" . TABLE_MAIL_USERS . "` WHERE `customerid`='" . (int)$id . "'");
|
||||||
$db->query("DELETE FROM `" . TABLE_MAIL_VIRTUAL . "` WHERE `customerid`='" . (int)$id . "'");
|
$db->query("DELETE FROM `" . TABLE_MAIL_VIRTUAL . "` WHERE `customerid`='" . (int)$id . "'");
|
||||||
$result2 = $db->query("SELECT `username` FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . (int)$id . "'");
|
$result = $db->query("SELECT `username` FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . (int)$id . "'");
|
||||||
while($row = $db->fetch_array($result2))
|
while($row = $db->fetch_array($result))
|
||||||
{
|
{
|
||||||
$db->query("DELETE FROM `" . TABLE_FTP_QUOTATALLIES . "` WHERE `name`='" . $row['username'] . "'");
|
$db->query("DELETE FROM `" . TABLE_FTP_QUOTATALLIES . "` WHERE `name`='" . $row['username'] . "'");
|
||||||
}
|
}
|
||||||
$db->query("DELETE FROM `" . TABLE_FTP_GROUPS . "` WHERE `customerid`='" . (int)$id . "'");
|
$db->query("DELETE FROM `" . TABLE_FTP_GROUPS . "` WHERE `customerid`='" . (int)$id . "'");
|
||||||
$db->query("DELETE FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . (int)$id . "'");
|
$db->query("DELETE FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . (int)$id . "'");
|
||||||
$db->query("DELETE FROM `" . TABLE_MAIL_AUTORESPONDER . "` WHERE `customerid`='" . (int)$id . "'");
|
$db->query("DELETE FROM `" . TABLE_MAIL_AUTORESPONDER . "` WHERE `customerid`='" . (int)$id . "'");
|
||||||
|
|
||||||
// Delete all waiting "create user" -tasks for this user, #276
|
|
||||||
// Note: the WHERE selects part of a serialized array, but it should be safe this way
|
|
||||||
$db->query("DELETE FROM `" . TABLE_PANEL_TASKS . "` WHERE `type` = '2' AND `data` LIKE '%:\"" . $db->escape($result['loginname']) . "\";%';");
|
|
||||||
|
|
||||||
// remove everything APS-related, #216
|
|
||||||
$apsresult = $db->query("SELECT `ID` FROM `".TABLE_APS_INSTANCES."` WHERE `CustomerID`='".(int)$id."'");
|
|
||||||
while($apsrow = $db->fetch_array($apsresult))
|
|
||||||
{
|
|
||||||
// remove all package related settings
|
|
||||||
$db->query("DELETE FROM `".TABLE_APS_SETTINGS."` WHERE `InstanceID` = '".(int)$apsrow['ID']."'");
|
|
||||||
// maybe some leftovers in the tasks
|
|
||||||
$db->query("DELETE FROM `".TABLE_APS_TASKS."` WHERE `InstanceID` = '".(int)$apsrow['ID']."'");
|
|
||||||
}
|
|
||||||
// now remove all user instances
|
|
||||||
$db->query("DELETE FROM `".TABLE_APS_INSTANCES."` WHERE `CustomerID`='".(int)$id."'");
|
|
||||||
// eventually some temp-setting-leftovers
|
|
||||||
$db->query("DELETE FROM `".TABLE_APS_TEMP_SETTINGS."` WHERE `CustomerID`='".(int)$id."'");
|
|
||||||
// eof APS-related removings, #216
|
|
||||||
|
|
||||||
$admin_update_query = "UPDATE `" . TABLE_PANEL_ADMINS . "` SET `customers_used` = `customers_used` - 1 ";
|
$admin_update_query = "UPDATE `" . TABLE_PANEL_ADMINS . "` SET `customers_used` = `customers_used` - 1 ";
|
||||||
$admin_update_query.= ", `domains_used` = `domains_used` - 0" . (int)($domains_deleted - $result['subdomains_used']);
|
$admin_update_query.= ", `domains_used` = `domains_used` - 0" . (int)($domains_deleted - $result['subdomains_used']);
|
||||||
|
|
||||||
@@ -295,11 +220,6 @@ if($page == 'customers'
|
|||||||
$admin_update_query.= ", `email_quota_used` = `email_quota_used` - 0" . (int)$result['email_quota'];
|
$admin_update_query.= ", `email_quota_used` = `email_quota_used` - 0" . (int)$result['email_quota'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if($result['email_autoresponder'] != '-1')
|
|
||||||
{
|
|
||||||
$admin_update_query.= ", `email_autoresponder` = `email_autoresponder` - 0" . (int)$result['email_autoresponder'];
|
|
||||||
}
|
|
||||||
|
|
||||||
if($result['subdomains'] != '-1')
|
if($result['subdomains'] != '-1')
|
||||||
{
|
{
|
||||||
$admin_update_query.= ", `subdomains_used` = `subdomains_used` - 0" . (int)$result['subdomains'];
|
$admin_update_query.= ", `subdomains_used` = `subdomains_used` - 0" . (int)$result['subdomains'];
|
||||||
@@ -315,11 +235,6 @@ if($page == 'customers'
|
|||||||
$admin_update_query.= ", `tickets_used` = `tickets_used` - 0" . (int)$result['tickets'];
|
$admin_update_query.= ", `tickets_used` = `tickets_used` - 0" . (int)$result['tickets'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if($result['aps_packages'] != '-1')
|
|
||||||
{
|
|
||||||
$admin_update_query.= ", `aps_packages` = `aps_packages` - 0" . (int)$result['aps_packages'];
|
|
||||||
}
|
|
||||||
|
|
||||||
if(($result['diskspace'] / 1024) != '-1')
|
if(($result['diskspace'] / 1024) != '-1')
|
||||||
{
|
{
|
||||||
$admin_update_query.= ", `diskspace_used` = `diskspace_used` - 0" . (int)$result['diskspace'];
|
$admin_update_query.= ", `diskspace_used` = `diskspace_used` - 0" . (int)$result['diskspace'];
|
||||||
@@ -438,32 +353,10 @@ if($page == 'customers'
|
|||||||
{
|
{
|
||||||
$email_quota = - 1;
|
$email_quota = - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($settings['autoresponder']['autoresponder_active'] == '1')
|
|
||||||
{
|
|
||||||
$email_autoresponder = intval_ressource($_POST['email_autoresponder']);
|
|
||||||
|
|
||||||
if(isset($_POST['email_autoresponder_ul']))
|
$email_imap = intval_ressource($_POST['email_imap']);
|
||||||
{
|
$email_pop3 = intval_ressource($_POST['email_pop3']);
|
||||||
$email_autoresponder = - 1;
|
$ftps = intval_ressource($_POST['ftps']);
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$email_autoresponder = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
$email_imap = 0;
|
|
||||||
if(isset($_POST['email_imap']))
|
|
||||||
$email_imap = intval_ressource($_POST['email_imap']);
|
|
||||||
|
|
||||||
$email_pop3 = 0;
|
|
||||||
if(isset($_POST['email_pop3']))
|
|
||||||
$email_pop3 = intval_ressource($_POST['email_pop3']);
|
|
||||||
|
|
||||||
$ftps = 0;
|
|
||||||
if(isset($_POST['ftps']))
|
|
||||||
$ftps = intval_ressource($_POST['ftps']);
|
|
||||||
|
|
||||||
if(isset($_POST['ftps_ul']))
|
if(isset($_POST['ftps_ul']))
|
||||||
{
|
{
|
||||||
@@ -498,43 +391,12 @@ if($page == 'customers'
|
|||||||
{
|
{
|
||||||
$number_of_aps_packages = 0;
|
$number_of_aps_packages = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$createstdsubdomain = 0;
|
$createstdsubdomain = intval($_POST['createstdsubdomain']);
|
||||||
if(isset($_POST['createstdsubdomain']))
|
$password = validate($_POST['customer_password'], 'password');
|
||||||
$createstdsubdomain = intval($_POST['createstdsubdomain']);
|
$password = validatePassword($password);
|
||||||
$password = validate($_POST['new_customer_password'], 'password');
|
$sendpassword = intval($_POST['sendpassword']);
|
||||||
// only check if not empty,
|
$phpenabled = intval($_POST['phpenabled']);
|
||||||
// cause empty == generate password automatically
|
|
||||||
if($password != '')
|
|
||||||
{
|
|
||||||
$password = validatePassword($password);
|
|
||||||
}
|
|
||||||
|
|
||||||
$backup_allowed = 0;
|
|
||||||
if(isset($_POST['backup_allowed']))
|
|
||||||
$backup_allowed = intval($_POST['backup_allowed']);
|
|
||||||
|
|
||||||
if ($backup_allowed != 0)
|
|
||||||
{
|
|
||||||
$backup_allowed = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
$sendpassword = 0;
|
|
||||||
if(isset($_POST['sendpassword']))
|
|
||||||
$sendpassword = intval($_POST['sendpassword']);
|
|
||||||
|
|
||||||
$phpenabled = 0;
|
|
||||||
if(isset($_POST['phpenabled']))
|
|
||||||
$phpenabled = intval($_POST['phpenabled']);
|
|
||||||
|
|
||||||
$perlenabled = 0;
|
|
||||||
if(isset($_POST['perlenabled']))
|
|
||||||
$perlenabled = intval($_POST['perlenabled']);
|
|
||||||
|
|
||||||
$store_defaultindex = 0;
|
|
||||||
if(isset($_POST['store_defaultindex']))
|
|
||||||
$store_defaultindex = intval($_POST['store_defaultindex']);
|
|
||||||
|
|
||||||
$diskspace = $diskspace * 1024;
|
$diskspace = $diskspace * 1024;
|
||||||
$traffic = $traffic * 1024 * 1024;
|
$traffic = $traffic * 1024 * 1024;
|
||||||
|
|
||||||
@@ -544,7 +406,6 @@ if($page == 'customers'
|
|||||||
|| ((($userinfo['email_accounts_used'] + $email_accounts) > $userinfo['email_accounts']) && $userinfo['email_accounts'] != '-1')
|
|| ((($userinfo['email_accounts_used'] + $email_accounts) > $userinfo['email_accounts']) && $userinfo['email_accounts'] != '-1')
|
||||||
|| ((($userinfo['email_forwarders_used'] + $email_forwarders) > $userinfo['email_forwarders']) && $userinfo['email_forwarders'] != '-1')
|
|| ((($userinfo['email_forwarders_used'] + $email_forwarders) > $userinfo['email_forwarders']) && $userinfo['email_forwarders'] != '-1')
|
||||||
|| ((($userinfo['email_quota_used'] + $email_quota) > $userinfo['email_quota']) && $userinfo['email_quota'] != '-1' && $settings['system']['mail_quota_enabled'] == '1')
|
|| ((($userinfo['email_quota_used'] + $email_quota) > $userinfo['email_quota']) && $userinfo['email_quota'] != '-1' && $settings['system']['mail_quota_enabled'] == '1')
|
||||||
|| ((($userinfo['email_autoresponder_used'] + $email_autoresponder) > $userinfo['email_autoresponder']) && $userinfo['email_autoresponder'] != '-1' && $settings['autoresponder']['autoresponder_active'] == '1')
|
|
||||||
|| ((($userinfo['ftps_used'] + $ftps) > $userinfo['ftps']) && $userinfo['ftps'] != '-1')
|
|| ((($userinfo['ftps_used'] + $ftps) > $userinfo['ftps']) && $userinfo['ftps'] != '-1')
|
||||||
|| ((($userinfo['tickets_used'] + $tickets) > $userinfo['tickets']) && $userinfo['tickets'] != '-1')
|
|| ((($userinfo['tickets_used'] + $tickets) > $userinfo['tickets']) && $userinfo['tickets'] != '-1')
|
||||||
|| ((($userinfo['subdomains_used'] + $subdomains) > $userinfo['subdomains']) && $userinfo['subdomains'] != '-1')
|
|| ((($userinfo['subdomains_used'] + $subdomains) > $userinfo['subdomains']) && $userinfo['subdomains'] != '-1')
|
||||||
@@ -555,7 +416,6 @@ if($page == 'customers'
|
|||||||
|| ($email_accounts == '-1' && $userinfo['email_accounts'] != '-1')
|
|| ($email_accounts == '-1' && $userinfo['email_accounts'] != '-1')
|
||||||
|| ($email_forwarders == '-1' && $userinfo['email_forwarders'] != '-1')
|
|| ($email_forwarders == '-1' && $userinfo['email_forwarders'] != '-1')
|
||||||
|| ($email_quota == '-1' && $userinfo['email_quota'] != '-1' && $settings['system']['mail_quota_enabled'] == '1')
|
|| ($email_quota == '-1' && $userinfo['email_quota'] != '-1' && $settings['system']['mail_quota_enabled'] == '1')
|
||||||
|| ($email_autoresponder == '-1' && $userinfo['email_autoresponder'] != '-1' && $settings['autoresponder']['autoresponder_active'] == '1')
|
|
||||||
|| ($ftps == '-1' && $userinfo['ftps'] != '-1')
|
|| ($ftps == '-1' && $userinfo['ftps'] != '-1')
|
||||||
|| ($tickets == '-1' && $userinfo['tickets'] != '-1')
|
|| ($tickets == '-1' && $userinfo['tickets'] != '-1')
|
||||||
|| ($subdomains == '-1' && $userinfo['subdomains'] != '-1')
|
|| ($subdomains == '-1' && $userinfo['subdomains'] != '-1')
|
||||||
@@ -587,11 +447,11 @@ if($page == 'customers'
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(isset($_POST['new_loginname'])
|
if(isset($_POST['loginname'])
|
||||||
&& $_POST['new_loginname'] != '')
|
&& $_POST['loginname'] != '')
|
||||||
{
|
{
|
||||||
$accountnumber = intval($settings['system']['lastaccountnumber']);
|
$accountnumber = intval($settings['system']['lastaccountnumber']);
|
||||||
$loginname = validate($_POST['new_loginname'], 'loginname', '/^[a-z0-9\-_]+$/i');
|
$loginname = validate($_POST['loginname'], 'loginname', '/^[a-z0-9\-_]+$/i');
|
||||||
|
|
||||||
// Accounts which match systemaccounts are not allowed, filtering them
|
// Accounts which match systemaccounts are not allowed, filtering them
|
||||||
|
|
||||||
@@ -639,56 +499,12 @@ if($page == 'customers'
|
|||||||
$phpenabled = '1';
|
$phpenabled = '1';
|
||||||
}
|
}
|
||||||
|
|
||||||
if($perlenabled != '0')
|
|
||||||
{
|
|
||||||
$perlenabled = '1';
|
|
||||||
}
|
|
||||||
|
|
||||||
if($password == '')
|
if($password == '')
|
||||||
{
|
{
|
||||||
$password = substr(md5(uniqid(microtime(), 1)), 12, 6);
|
$password = substr(md5(uniqid(microtime(), 1)), 12, 6);
|
||||||
}
|
}
|
||||||
|
|
||||||
$_theme = $settings['panel']['default_theme'];
|
$result = $db->query("INSERT INTO `" . TABLE_PANEL_CUSTOMERS . "` (`adminid`, `loginname`, `password`, `name`, `firstname`, `company`, `street`, `zipcode`, `city`, `phone`, `fax`, `email`, `customernumber`, `def_language`, `documentroot`, `guid`, `diskspace`, `traffic`, `subdomains`, `emails`, `email_accounts`, `email_forwarders`, `email_quota`, `ftps`, `tickets`, `mysqls`, `standardsubdomain`, `phpenabled`, `imap`, `pop3`, `aps_packages`) VALUES ('" . (int)$userinfo['adminid'] . "', '" . $db->escape($loginname) . "', '" . md5($password) . "', '" . $db->escape($name) . "', '" . $db->escape($firstname) . "', '" . $db->escape($company) . "', '" . $db->escape($street) . "', '" . $db->escape($zipcode) . "', '" . $db->escape($city) . "', '" . $db->escape($phone) . "', '" . $db->escape($fax) . "', '" . $db->escape($email) . "', '" . $db->escape($customernumber) . "','" . $db->escape($def_language) . "', '" . $db->escape($documentroot) . "', '" . $db->escape($guid) . "', '" . $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) . "', '0', '" . $db->escape($phpenabled) . "', '" . $db->escape($email_imap) . "', '" . $db->escape($email_pop3) . "', '" . (int)$number_of_aps_packages . "')");
|
||||||
|
|
||||||
$result = $db->query(
|
|
||||||
"INSERT INTO `" . TABLE_PANEL_CUSTOMERS . "` SET
|
|
||||||
`adminid` = '" . (int)$userinfo['adminid'] . "',
|
|
||||||
`loginname` = '" . $db->escape($loginname) . "',
|
|
||||||
`password` = '" . md5($password) . "',
|
|
||||||
`name` = '" . $db->escape($name) . "',
|
|
||||||
`firstname` = '" . $db->escape($firstname) . "',
|
|
||||||
`company` = '" . $db->escape($company) . "',
|
|
||||||
`street` = '" . $db->escape($street) . "',
|
|
||||||
`zipcode` = '" . $db->escape($zipcode) . "',
|
|
||||||
`city` = '" . $db->escape($city) . "',
|
|
||||||
`phone` = '" . $db->escape($phone) . "',
|
|
||||||
`fax` = '" . $db->escape($fax) . "',
|
|
||||||
`email` = '" . $db->escape($email) . "',
|
|
||||||
`customernumber` = '" . $db->escape($customernumber) . "',
|
|
||||||
`def_language` = '" . $db->escape($def_language) . "',
|
|
||||||
`documentroot` = '" . $db->escape($documentroot) . "',
|
|
||||||
`guid` = '" . $db->escape($guid) . "',
|
|
||||||
`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) . "',
|
|
||||||
`standardsubdomain` = '0',
|
|
||||||
`phpenabled` = '" . $db->escape($phpenabled) . "',
|
|
||||||
`imap` = '" . $db->escape($email_imap) . "',
|
|
||||||
`pop3` = '" . $db->escape($email_pop3) . "',
|
|
||||||
`aps_packages` = '" . (int)$number_of_aps_packages . "',
|
|
||||||
`perlenabled` = '" . $db->escape($perlenabled) . "',
|
|
||||||
`email_autoresponder` = '" . $db->escape($email_autoresponder) . "',
|
|
||||||
`backup_allowed` = '" . $db->escape($backup_allowed) . "',
|
|
||||||
`theme` = '" . $db->escape($_theme) . "'"
|
|
||||||
);
|
|
||||||
$customerid = $db->insert_id();
|
$customerid = $db->insert_id();
|
||||||
$admin_update_query = "UPDATE `" . TABLE_PANEL_ADMINS . "` SET `customers_used` = `customers_used` + 1";
|
$admin_update_query = "UPDATE `" . TABLE_PANEL_ADMINS . "` SET `customers_used` = `customers_used` + 1";
|
||||||
|
|
||||||
@@ -717,12 +533,6 @@ if($page == 'customers'
|
|||||||
$admin_update_query.= ", `email_quota_used` = `email_quota_used` + 0" . (int)$email_quota;
|
$admin_update_query.= ", `email_quota_used` = `email_quota_used` + 0" . (int)$email_quota;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($email_autoresponder != '-1'
|
|
||||||
&& $settings['autoresponder']['autoresponder_active'] == 1)
|
|
||||||
{
|
|
||||||
$admin_update_query.= ", `email_autoresponder_used` = `email_autoresponder_used` + 0" . (int)$email_autoresponder;
|
|
||||||
}
|
|
||||||
|
|
||||||
if($subdomains != '-1')
|
if($subdomains != '-1')
|
||||||
{
|
{
|
||||||
$admin_update_query.= ", `subdomains_used` = `subdomains_used` + 0" . (int)$subdomains;
|
$admin_update_query.= ", `subdomains_used` = `subdomains_used` + 0" . (int)$subdomains;
|
||||||
@@ -759,7 +569,7 @@ if($page == 'customers'
|
|||||||
}
|
}
|
||||||
|
|
||||||
$log->logAction(ADM_ACTION, LOG_INFO, "added user '" . $loginname . "'");
|
$log->logAction(ADM_ACTION, LOG_INFO, "added user '" . $loginname . "'");
|
||||||
inserttask('2', $loginname, $guid, $guid, $store_defaultindex);
|
inserttask('2', $loginname, $guid, $guid);
|
||||||
|
|
||||||
// Add htpasswd for the webalizer stats
|
// Add htpasswd for the webalizer stats
|
||||||
|
|
||||||
@@ -815,8 +625,7 @@ if($page == 'customers'
|
|||||||
"`openbasedir` = '1', " .
|
"`openbasedir` = '1', " .
|
||||||
"`safemode` = '1', " .
|
"`safemode` = '1', " .
|
||||||
"`speciallogfile` = '0', " .
|
"`speciallogfile` = '0', " .
|
||||||
"`specialsettings` = '', " .
|
"`specialsettings` = ''");
|
||||||
"`add_date` = '".date('Y-m-d')."'");
|
|
||||||
$domainid = $db->insert_id();
|
$domainid = $db->insert_id();
|
||||||
$db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `standardsubdomain`=\'' . (int)$domainid . '\' WHERE `customerid`=\'' . (int)$customerid . '\'');
|
$db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `standardsubdomain`=\'' . (int)$domainid . '\' WHERE `customerid`=\'' . (int)$customerid . '\'');
|
||||||
$log->logAction(ADM_ACTION, LOG_NOTICE, "automatically added standardsubdomain for user '" . $loginname . "'");
|
$log->logAction(ADM_ACTION, LOG_NOTICE, "automatically added standardsubdomain for user '" . $loginname . "'");
|
||||||
@@ -828,6 +637,7 @@ if($page == 'customers'
|
|||||||
$replace_arr = array(
|
$replace_arr = array(
|
||||||
'FIRSTNAME' => $firstname,
|
'FIRSTNAME' => $firstname,
|
||||||
'NAME' => $name,
|
'NAME' => $name,
|
||||||
|
'TITLE' => $title,
|
||||||
'COMPANY' => $company,
|
'COMPANY' => $company,
|
||||||
'SALUTATION' => getCorrectUserSalutation(array('firstname' => $firstname, 'name' => $name, 'company' => $company)),
|
'SALUTATION' => getCorrectUserSalutation(array('firstname' => $firstname, 'name' => $name, 'company' => $company)),
|
||||||
'USERNAME' => $loginname,
|
'USERNAME' => $loginname,
|
||||||
@@ -874,7 +684,7 @@ if($page == 'customers'
|
|||||||
|
|
||||||
while(list($language_file, $language_name) = each($languages))
|
while(list($language_file, $language_name) = each($languages))
|
||||||
{
|
{
|
||||||
$language_options.= makeoption($language_name, $language_file, $settings['panel']['standardlanguage'], true);
|
$language_options.= makeoption($language_name, $language_file, $userinfo['def_language'], true);
|
||||||
}
|
}
|
||||||
|
|
||||||
$diskspace_ul = makecheckbox('diskspace_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
$diskspace_ul = makecheckbox('diskspace_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||||
@@ -884,26 +694,15 @@ if($page == 'customers'
|
|||||||
$email_accounts_ul = makecheckbox('email_accounts_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_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);
|
$email_quota_ul = makecheckbox('email_quota_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||||
$email_autoresponder_ul = makecheckbox('email_autoresponder_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
|
||||||
$ftps_ul = makecheckbox('ftps_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);
|
$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);
|
$mysqls_ul = makecheckbox('mysqls_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||||
$number_of_aps_packages_ul = makecheckbox('number_of_aps_packages_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
$number_of_aps_packages_ul = makecheckbox('number_of_aps_packages_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||||
#$createstdsubdomain = makeyesno('createstdsubdomain', '1', '0', '1');
|
$createstdsubdomain = makeyesno('createstdsubdomain', '1', '0', '1');
|
||||||
#$email_imap = makeyesno('email_imap', '1', '0', '1');
|
$email_imap = makeyesno('email_imap', '1', '0', '1');
|
||||||
#$email_pop3 = makeyesno('email_pop3', '1', '0', '1');
|
$email_pop3 = makeyesno('email_pop3', '1', '0', '1');
|
||||||
#$sendpassword = makeyesno('sendpassword', '1', '0', '1');
|
$sendpassword = makeyesno('sendpassword', '1', '0', '1');
|
||||||
#$phpenabled = makeyesno('phpenabled', '1', '0', '1');
|
$phpenabled = makeyesno('phpenabled', '1', '0', '1');
|
||||||
#$perlenabled = makeyesno('perlenabled', '1', '0', '0');
|
|
||||||
#$store_defaultindex = makeyesno('store_defaultindex', '1', '0', '1');
|
|
||||||
$backup_allowed = makeyesno('backup_allowed', '1', '0', '0');
|
|
||||||
|
|
||||||
$customer_add_data = include_once dirname(__FILE__).'/lib/formfields/admin/customer/formfield.customer_add.php';
|
|
||||||
$customer_add_form = htmlform::genHTMLForm($customer_add_data);
|
|
||||||
|
|
||||||
$title = $customer_add_data['customer_add']['title'];
|
|
||||||
$image = $customer_add_data['customer_add']['image'];
|
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("customers/customers_add") . "\";");
|
eval("echo \"" . getTemplate("customers/customers_add") . "\";");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -929,7 +728,7 @@ if($page == 'customers'
|
|||||||
$email = $idna_convert->encode(validate($_POST['email'], 'email'));
|
$email = $idna_convert->encode(validate($_POST['email'], 'email'));
|
||||||
$customernumber = validate($_POST['customernumber'], 'customer number', '/^[A-Za-z0-9 \-]*$/Di');
|
$customernumber = validate($_POST['customernumber'], 'customer number', '/^[A-Za-z0-9 \-]*$/Di');
|
||||||
$def_language = validate($_POST['def_language'], 'default language');
|
$def_language = validate($_POST['def_language'], 'default language');
|
||||||
$password = validate($_POST['new_customer_password'], 'new password');
|
$password = validate($_POST['customer_password'], 'new password');
|
||||||
$diskspace = intval_ressource($_POST['diskspace']);
|
$diskspace = intval_ressource($_POST['diskspace']);
|
||||||
|
|
||||||
if(isset($_POST['diskspace_ul']))
|
if(isset($_POST['diskspace_ul']))
|
||||||
@@ -986,31 +785,9 @@ if($page == 'customers'
|
|||||||
$email_quota = - 1;
|
$email_quota = - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($settings['autoresponder']['autoresponder_active'] == '1')
|
$email_imap = intval_ressource($_POST['email_imap']);
|
||||||
{
|
$email_pop3 = intval_ressource($_POST['email_pop3']);
|
||||||
$email_autoresponder = intval_ressource($_POST['email_autoresponder']);
|
$ftps = intval_ressource($_POST['ftps']);
|
||||||
|
|
||||||
if(isset($_POST['email_autoresponder_ul']))
|
|
||||||
{
|
|
||||||
$email_autoresponder = - 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$email_autoresponder = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
$email_imap = 0;
|
|
||||||
if(isset($_POST['email_imap']))
|
|
||||||
$email_imap = intval_ressource($_POST['email_imap']);
|
|
||||||
|
|
||||||
$email_pop3 = 0;
|
|
||||||
if(isset($_POST['email_pop3']))
|
|
||||||
$email_pop3 = intval_ressource($_POST['email_pop3']);
|
|
||||||
|
|
||||||
$ftps = 0;
|
|
||||||
if(isset($_POST['ftps']))
|
|
||||||
$ftps = intval_ressource($_POST['ftps']);
|
|
||||||
|
|
||||||
if(isset($_POST['ftps_ul']))
|
if(isset($_POST['ftps_ul']))
|
||||||
{
|
{
|
||||||
@@ -1024,18 +801,8 @@ if($page == 'customers'
|
|||||||
{
|
{
|
||||||
$tickets = - 1;
|
$tickets = - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$backup_allowed = 0;
|
|
||||||
if (isset($_POST['backup_allowed']))
|
|
||||||
$backup_allowed = intval($_POST['backup_allowed']);
|
|
||||||
|
|
||||||
if($backup_allowed != '0'){
|
|
||||||
$backup_allowed = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
$mysqls = 0;
|
$mysqls = intval_ressource($_POST['mysqls']);
|
||||||
if(isset($_POST['mysqls']))
|
|
||||||
$mysqls = intval_ressource($_POST['mysqls']);
|
|
||||||
|
|
||||||
if(isset($_POST['mysqls_ul']))
|
if(isset($_POST['mysqls_ul']))
|
||||||
{
|
{
|
||||||
@@ -1056,21 +823,9 @@ if($page == 'customers'
|
|||||||
$number_of_aps_packages = 0;
|
$number_of_aps_packages = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$createstdsubdomain = 0;
|
$createstdsubdomain = intval($_POST['createstdsubdomain']);
|
||||||
if(isset($_POST['createstdsubdomain']))
|
$deactivated = intval($_POST['deactivated']);
|
||||||
$createstdsubdomain = intval($_POST['createstdsubdomain']);
|
$phpenabled = intval($_POST['phpenabled']);
|
||||||
|
|
||||||
$deactivated = 0;
|
|
||||||
if(isset($_POST['deactivated']))
|
|
||||||
$deactivated = intval($_POST['deactivated']);
|
|
||||||
|
|
||||||
$phpenabled = 0;
|
|
||||||
if(isset($_POST['phpenabled']))
|
|
||||||
$phpenabled = intval($_POST['phpenabled']);
|
|
||||||
|
|
||||||
$perlenabled = 0;
|
|
||||||
if(isset($_POST['perlenabled']))
|
|
||||||
$perlenabled = intval($_POST['perlenabled']);
|
|
||||||
$diskspace = $diskspace * 1024;
|
$diskspace = $diskspace * 1024;
|
||||||
$traffic = $traffic * 1024 * 1024;
|
$traffic = $traffic * 1024 * 1024;
|
||||||
|
|
||||||
@@ -1080,7 +835,6 @@ if($page == 'customers'
|
|||||||
|| ((($userinfo['email_accounts_used'] + $email_accounts - $result['email_accounts']) > $userinfo['email_accounts']) && $userinfo['email_accounts'] != '-1')
|
|| ((($userinfo['email_accounts_used'] + $email_accounts - $result['email_accounts']) > $userinfo['email_accounts']) && $userinfo['email_accounts'] != '-1')
|
||||||
|| ((($userinfo['email_forwarders_used'] + $email_forwarders - $result['email_forwarders']) > $userinfo['email_forwarders']) && $userinfo['email_forwarders'] != '-1')
|
|| ((($userinfo['email_forwarders_used'] + $email_forwarders - $result['email_forwarders']) > $userinfo['email_forwarders']) && $userinfo['email_forwarders'] != '-1')
|
||||||
|| ((($userinfo['email_quota_used'] + $email_quota - $result['email_quota']) > $userinfo['email_quota']) && $userinfo['email_quota'] != '-1' && $settings['system']['mail_quota_enabled'] == '1')
|
|| ((($userinfo['email_quota_used'] + $email_quota - $result['email_quota']) > $userinfo['email_quota']) && $userinfo['email_quota'] != '-1' && $settings['system']['mail_quota_enabled'] == '1')
|
||||||
|| ((($userinfo['email_autoresponder_used'] + $email_autoresponder - $result['email_autoresponder']) > $userinfo['email_autoresponder']) && $userinfo['email_autoresponder'] != '-1' && $settings['autoresponder']['autoresponder_active'] == '1')
|
|
||||||
|| ((($userinfo['ftps_used'] + $ftps - $result['ftps']) > $userinfo['ftps']) && $userinfo['ftps'] != '-1')
|
|| ((($userinfo['ftps_used'] + $ftps - $result['ftps']) > $userinfo['ftps']) && $userinfo['ftps'] != '-1')
|
||||||
|| ((($userinfo['tickets_used'] + $tickets - $result['tickets']) > $userinfo['tickets']) && $userinfo['tickets'] != '-1')
|
|| ((($userinfo['tickets_used'] + $tickets - $result['tickets']) > $userinfo['tickets']) && $userinfo['tickets'] != '-1')
|
||||||
|| ((($userinfo['subdomains_used'] + $subdomains - $result['subdomains']) > $userinfo['subdomains']) && $userinfo['subdomains'] != '-1')
|
|| ((($userinfo['subdomains_used'] + $subdomains - $result['subdomains']) > $userinfo['subdomains']) && $userinfo['subdomains'] != '-1')
|
||||||
@@ -1091,7 +845,6 @@ if($page == 'customers'
|
|||||||
|| ($email_accounts == '-1' && $userinfo['email_accounts'] != '-1')
|
|| ($email_accounts == '-1' && $userinfo['email_accounts'] != '-1')
|
||||||
|| ($email_forwarders == '-1' && $userinfo['email_forwarders'] != '-1')
|
|| ($email_forwarders == '-1' && $userinfo['email_forwarders'] != '-1')
|
||||||
|| ($email_quota == '-1' && $userinfo['email_quota'] != '-1' && $settings['system']['mail_quota_enabled'] == '1')
|
|| ($email_quota == '-1' && $userinfo['email_quota'] != '-1' && $settings['system']['mail_quota_enabled'] == '1')
|
||||||
|| ($email_autoresponder == '-1' && $userinfo['email_autoresponder'] != '-1' && $settings['autoresponder']['autoresponder_active'] == '1')
|
|
||||||
|| ($ftps == '-1' && $userinfo['ftps'] != '-1')
|
|| ($ftps == '-1' && $userinfo['ftps'] != '-1')
|
||||||
|| ($tickets == '-1' && $userinfo['tickets'] != '-1')
|
|| ($tickets == '-1' && $userinfo['tickets'] != '-1')
|
||||||
|| ($subdomains == '-1' && $userinfo['subdomains'] != '-1')
|
|| ($subdomains == '-1' && $userinfo['subdomains'] != '-1')
|
||||||
@@ -1151,7 +904,7 @@ if($page == 'customers'
|
|||||||
$_stdsubdomain = $result['loginname'] . '.' . $settings['system']['hostname'];
|
$_stdsubdomain = $result['loginname'] . '.' . $settings['system']['hostname'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` " . "(`domain`, `customerid`, `adminid`, `parentdomainid`, `ipandport`, `documentroot`, `zonefile`, `isemaildomain`, `caneditdomain`, `openbasedir`, `safemode`, `speciallogfile`, `specialsettings`, `add_date`) " . "VALUES ('" . $db->escape($_stdsubdomain) . "', '" . (int)$result['customerid'] . "', '" . (int)$userinfo['adminid'] . "', '-1', '" . $db->escape($settings['system']['defaultip']) . "', '" . $db->escape($result['documentroot']) . "', '', '0', '0', '1', '1', '0', '', '".date('Y-m-d')."')");
|
$db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` " . "(`domain`, `customerid`, `adminid`, `parentdomainid`, `ipandport`, `documentroot`, `zonefile`, `isemaildomain`, `caneditdomain`, `openbasedir`, `safemode`, `speciallogfile`, `specialsettings`) " . "VALUES ('" . $db->escape($_stdsubdomain) . "', '" . (int)$result['customerid'] . "', '" . (int)$userinfo['adminid'] . "', '-1', '" . $db->escape($settings['system']['defaultip']) . "', '" . $db->escape($result['documentroot']) . "', '', '0', '0', '1', '1', '0', '')");
|
||||||
$domainid = $db->insert_id();
|
$domainid = $db->insert_id();
|
||||||
$db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `standardsubdomain`=\'' . (int)$domainid . '\' WHERE `customerid`=\'' . (int)$result['customerid'] . '\'');
|
$db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `standardsubdomain`=\'' . (int)$domainid . '\' WHERE `customerid`=\'' . (int)$result['customerid'] . '\'');
|
||||||
$log->logAction(ADM_ACTION, LOG_NOTICE, "automatically added standardsubdomain for user '" . $result['loginname'] . "'");
|
$log->logAction(ADM_ACTION, LOG_NOTICE, "automatically added standardsubdomain for user '" . $result['loginname'] . "'");
|
||||||
@@ -1177,13 +930,7 @@ if($page == 'customers'
|
|||||||
$phpenabled = '1';
|
$phpenabled = '1';
|
||||||
}
|
}
|
||||||
|
|
||||||
if($perlenabled != '0')
|
if($phpenabled != $result['phpenabled'])
|
||||||
{
|
|
||||||
$perlenabled = '1';
|
|
||||||
}
|
|
||||||
|
|
||||||
if($phpenabled != $result['phpenabled']
|
|
||||||
|| $perlenabled != $result['perlenabled'])
|
|
||||||
{
|
{
|
||||||
inserttask('1');
|
inserttask('1');
|
||||||
}
|
}
|
||||||
@@ -1193,47 +940,6 @@ if($page == 'customers'
|
|||||||
$db->query("UPDATE `" . TABLE_MAIL_USERS . "` SET `postfix`='" . (($deactivated) ? 'N' : 'Y') . "', `pop3`='" . (($deactivated) ? '0' : '1') . "', `imap`='" . (($deactivated) ? '0' : '1') . "' WHERE `customerid`='" . (int)$id . "'");
|
$db->query("UPDATE `" . TABLE_MAIL_USERS . "` SET `postfix`='" . (($deactivated) ? 'N' : 'Y') . "', `pop3`='" . (($deactivated) ? '0' : '1') . "', `imap`='" . (($deactivated) ? '0' : '1') . "' WHERE `customerid`='" . (int)$id . "'");
|
||||||
$db->query("UPDATE `" . TABLE_FTP_USERS . "` SET `login_enabled`='" . (($deactivated) ? 'N' : 'Y') . "' WHERE `customerid`='" . (int)$id . "'");
|
$db->query("UPDATE `" . TABLE_FTP_USERS . "` SET `login_enabled`='" . (($deactivated) ? 'N' : 'Y') . "' WHERE `customerid`='" . (int)$id . "'");
|
||||||
$db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `deactivated`='" . (int)$deactivated . "' WHERE `customerid`='" . (int)$id . "'");
|
$db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `deactivated`='" . (int)$deactivated . "' WHERE `customerid`='" . (int)$id . "'");
|
||||||
|
|
||||||
/* Retrieve customer's databases */
|
|
||||||
$databases = $db->query("SELECT * FROM " . TABLE_PANEL_DATABASES . " WHERE customerid='" . (int)$id . "' ORDER BY `dbserver`");
|
|
||||||
$db_root = new db($sql_root[0]['host'], $sql_root[0]['user'], $sql_root[0]['password'], '');
|
|
||||||
unset($db_root->password);
|
|
||||||
$last_dbserver = 0;
|
|
||||||
|
|
||||||
/* For each of them */
|
|
||||||
while($row_database = $db->fetch_array($databases))
|
|
||||||
{
|
|
||||||
if($last_dbserver != $row_database['dbserver'])
|
|
||||||
{
|
|
||||||
$db_root->query('FLUSH PRIVILEGES;');
|
|
||||||
$db_root->close();
|
|
||||||
$db_root = new db($sql_root[$row_database['dbserver']]['host'], $sql_root[$row_database['dbserver']]['user'], $sql_root[$row_database['dbserver']]['password'], '');
|
|
||||||
unset($db_root->password);
|
|
||||||
$last_dbserver = $row_database['dbserver'];
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach(array_unique(explode(',', $settings['system']['mysql_access_host'])) as $mysql_access_host)
|
|
||||||
{
|
|
||||||
$mysql_access_host = trim($mysql_access_host);
|
|
||||||
|
|
||||||
/* Prevent access, if deactivated */
|
|
||||||
if($deactivated)
|
|
||||||
{
|
|
||||||
$db_root->query('REVOKE ALL PRIVILEGES ON * . * FROM `' . $db_root->escape($row_database['databasename']) . '`@`' . $db_root->escape($mysql_access_host) . '`');
|
|
||||||
$db_root->query('REVOKE ALL PRIVILEGES ON `' . str_replace('_', '\_', $db_root->escape($row_database['databasename'])) . '` . * FROM `' . $db_root->escape($row_database['databasename']) . '`@`' . $db_root->escape($mysql_access_host) . '`');
|
|
||||||
}
|
|
||||||
else /* Otherwise grant access */
|
|
||||||
{
|
|
||||||
$db_root->query('GRANT ALL PRIVILEGES ON `' . $db_root->escape($row_database['databasename']) .'`.* TO `' . $db_root->escape($row_database['databasename']) . '`@`' . $db_root->escape($mysql_access_host) . '`');
|
|
||||||
$db_root->query('GRANT ALL PRIVILEGES ON `' . str_replace('_', '\_', $db_root->escape($row_database['databasename'])) . '` . * TO `' . $db_root->escape($row_database['databasename']) . '`@`' . $db_root->escape($mysql_access_host) . '`');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* At last flush the new privileges */
|
|
||||||
$db_root->query('FLUSH PRIVILEGES;');
|
|
||||||
$db_root->close();
|
|
||||||
|
|
||||||
$log->logAction(ADM_ACTION, LOG_INFO, "deactivated user '" . $result['loginname'] . "'");
|
$log->logAction(ADM_ACTION, LOG_INFO, "deactivated user '" . $result['loginname'] . "'");
|
||||||
inserttask('1');
|
inserttask('1');
|
||||||
}
|
}
|
||||||
@@ -1252,8 +958,7 @@ if($page == 'customers'
|
|||||||
$db->query("UPDATE `" . TABLE_MAIL_USERS . "` SET `imap`='" . (int)$email_imap . "' WHERE `customerid`='" . (int)$id . "'");
|
$db->query("UPDATE `" . TABLE_MAIL_USERS . "` SET `imap`='" . (int)$email_imap . "' WHERE `customerid`='" . (int)$id . "'");
|
||||||
}
|
}
|
||||||
|
|
||||||
// $db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `name`='" . $db->escape($name) . "', `firstname`='" . $db->escape($firstname) . "', `company`='" . $db->escape($company) . "', `street`='" . $db->escape($street) . "', `zipcode`='" . $db->escape($zipcode) . "', `city`='" . $db->escape($city) . "', `phone`='" . $db->escape($phone) . "', `fax`='" . $db->escape($fax) . "', `email`='" . $db->escape($email) . "', `customernumber`='" . $db->escape($customernumber) . "', `def_language`='" . $db->escape($def_language) . "', `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) . "', `ftps`='" . $db->escape($ftps) . "', `tickets`='" . $db->escape($tickets) . "', `mysqls`='" . $db->escape($mysqls) . "', `deactivated`='" . $db->escape($deactivated) . "', `phpenabled`='" . $db->escape($phpenabled) . "', `email_quota`='" . $db->escape($email_quota) . "', `imap`='" . $db->escape($email_imap) . "', `pop3`='" . $db->escape($email_pop3) . "', `aps_packages`='" . (int)$number_of_aps_packages . "', `perlenabled`='" . $db->escape($perlenabled) . "', `email_autoresponder`='" . $db->escape($email_autoresponder) . "' WHERE `customerid`='" . (int)$id . "'");
|
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `name`='" . $db->escape($name) . "', `firstname`='" . $db->escape($firstname) . "', `company`='" . $db->escape($company) . "', `street`='" . $db->escape($street) . "', `zipcode`='" . $db->escape($zipcode) . "', `city`='" . $db->escape($city) . "', `phone`='" . $db->escape($phone) . "', `fax`='" . $db->escape($fax) . "', `email`='" . $db->escape($email) . "', `customernumber`='" . $db->escape($customernumber) . "', `def_language`='" . $db->escape($def_language) . "', `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) . "', `ftps`='" . $db->escape($ftps) . "', `tickets`='" . $db->escape($tickets) . "', `mysqls`='" . $db->escape($mysqls) . "', `deactivated`='" . $db->escape($deactivated) . "', `phpenabled`='" . $db->escape($phpenabled) . "', `email_quota`='" . $db->escape($email_quota) . "', `imap`='" . $db->escape($email_imap) . "', `pop3`='" . $db->escape($email_pop3) . "', `aps_packages`='" . (int)$number_of_aps_packages . "' WHERE `customerid`='" . (int)$id . "'");
|
||||||
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `name`='" . $db->escape($name) . "', `firstname`='" . $db->escape($firstname) . "', `company`='" . $db->escape($company) . "', `street`='" . $db->escape($street) . "', `zipcode`='" . $db->escape($zipcode) . "', `city`='" . $db->escape($city) . "', `phone`='" . $db->escape($phone) . "', `fax`='" . $db->escape($fax) . "', `email`='" . $db->escape($email) . "', `customernumber`='" . $db->escape($customernumber) . "', `def_language`='" . $db->escape($def_language) . "', `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) . "', `ftps`='" . $db->escape($ftps) . "', `tickets`='" . $db->escape($tickets) . "', `mysqls`='" . $db->escape($mysqls) . "', `deactivated`='" . $db->escape($deactivated) . "', `phpenabled`='" . $db->escape($phpenabled) . "', `email_quota`='" . $db->escape($email_quota) . "', `imap`='" . $db->escape($email_imap) . "', `pop3`='" . $db->escape($email_pop3) . "', `aps_packages`='" . (int)$number_of_aps_packages . "', `perlenabled`='" . $db->escape($perlenabled) . "', `email_autoresponder`='" . $db->escape($email_autoresponder) . "', `backup_allowed`='" . $db->escape($backup_allowed) . "' WHERE `customerid`='" . (int)$id . "'");
|
|
||||||
$admin_update_query = "UPDATE `" . TABLE_PANEL_ADMINS . "` SET `customers_used` = `customers_used` ";
|
$admin_update_query = "UPDATE `" . TABLE_PANEL_ADMINS . "` SET `customers_used` = `customers_used` ";
|
||||||
|
|
||||||
if($mysqls != '-1'
|
if($mysqls != '-1'
|
||||||
@@ -1336,22 +1041,6 @@ if($page == 'customers'
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($email_autoresponder != '-1'
|
|
||||||
|| $result['email_autoresponder'] != '-1')
|
|
||||||
{
|
|
||||||
$admin_update_query.= ", `email_autoresponder_used` = `email_autoresponder_used` ";
|
|
||||||
|
|
||||||
if($email_autoresponder != '-1')
|
|
||||||
{
|
|
||||||
$admin_update_query.= " + 0" . (int)$email_autoresponder . " ";
|
|
||||||
}
|
|
||||||
|
|
||||||
if($result['email_autoresponder'] != '-1')
|
|
||||||
{
|
|
||||||
$admin_update_query.= " - 0" . (int)$result['email_autoresponder'] . " ";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if($subdomains != '-1'
|
if($subdomains != '-1'
|
||||||
|| $result['subdomains'] != '-1')
|
|| $result['subdomains'] != '-1')
|
||||||
{
|
{
|
||||||
@@ -1504,13 +1193,6 @@ if($page == 'customers'
|
|||||||
$result['email_quota'] = '';
|
$result['email_quota'] = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$email_autoresponder_ul = makecheckbox('email_autoresponder_ul', $lng['customer']['unlimited'], '-1', false, $result['email_autoresponder'], true, true);
|
|
||||||
|
|
||||||
if($result['email_autoresponder'] == '-1')
|
|
||||||
{
|
|
||||||
$result['email_autoresponder'] = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
$ftps_ul = makecheckbox('ftps_ul', $lng['customer']['unlimited'], '-1', false, $result['ftps'], true, true);
|
$ftps_ul = makecheckbox('ftps_ul', $lng['customer']['unlimited'], '-1', false, $result['ftps'], true, true);
|
||||||
|
|
||||||
if($result['ftps'] == '-1')
|
if($result['ftps'] == '-1')
|
||||||
@@ -1539,21 +1221,13 @@ if($page == 'customers'
|
|||||||
$result['aps_packages'] = '';
|
$result['aps_packages'] = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
#$createstdsubdomain = makeyesno('createstdsubdomain', '1', '0', (($result['standardsubdomain'] != '0') ? '1' : '0'));
|
$createstdsubdomain = makeyesno('createstdsubdomain', '1', '0', (($result['standardsubdomain'] != '0') ? '1' : '0'));
|
||||||
#$phpenabled = makeyesno('phpenabled', '1', '0', $result['phpenabled']);
|
$phpenabled = makeyesno('phpenabled', '1', '0', $result['phpenabled']);
|
||||||
#$perlenabled = makeyesno('perlenabled', '1', '0', $result['perlenabled']);
|
$deactivated = makeyesno('deactivated', '1', '0', $result['deactivated']);
|
||||||
#$deactivated = makeyesno('deactivated', '1', '0', $result['deactivated']);
|
$email_imap = makeyesno('email_imap', '1', '0', $result['imap']);
|
||||||
#$email_imap = makeyesno('email_imap', '1', '0', $result['imap']);
|
$email_pop3 = makeyesno('email_pop3', '1', '0', $result['pop3']);
|
||||||
#$email_pop3 = makeyesno('email_pop3', '1', '0', $result['pop3']);
|
|
||||||
$backup_allowed = makeyesno('backup_allowed', '1', '0', $result['backup_allowed']);
|
|
||||||
$result = htmlentities_array($result);
|
$result = htmlentities_array($result);
|
||||||
|
|
||||||
$customer_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/customer/formfield.customer_edit.php';
|
|
||||||
$customer_edit_form = htmlform::genHTMLForm($customer_edit_data);
|
|
||||||
|
|
||||||
$title = $customer_edit_data['customer_edit']['title'];
|
|
||||||
$image = $customer_edit_data['customer_edit']['image'];
|
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("customers/customers_edit") . "\";");
|
eval("echo \"" . getTemplate("customers/customers_edit") . "\";");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -130,8 +130,6 @@ if($page == 'domains'
|
|||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
$domainscount = $db->num_rows($result);
|
|
||||||
|
|
||||||
// Display the list
|
// Display the list
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("domains/domains") . "\";");
|
eval("echo \"" . getTemplate("domains/domains") . "\";");
|
||||||
@@ -144,8 +142,8 @@ if($page == 'domains'
|
|||||||
$alias_check = $db->query_first('SELECT COUNT(`id`) AS `count` FROM `' . TABLE_PANEL_DOMAINS . '` WHERE `aliasdomain`=\'' . (int)$id . '\'');
|
$alias_check = $db->query_first('SELECT COUNT(`id`) AS `count` FROM `' . TABLE_PANEL_DOMAINS . '` WHERE `aliasdomain`=\'' . (int)$id . '\'');
|
||||||
|
|
||||||
if($result['domain'] != ''
|
if($result['domain'] != ''
|
||||||
&& $alias_check['count'] == 0
|
&& $alias_check['count'] == 0)
|
||||||
) {
|
{
|
||||||
if(isset($_POST['send'])
|
if(isset($_POST['send'])
|
||||||
&& $_POST['send'] == 'send')
|
&& $_POST['send'] == 'send')
|
||||||
{
|
{
|
||||||
@@ -157,15 +155,7 @@ if($page == 'domains'
|
|||||||
standard_error('domains_cantdeletedomainwithapsinstances');
|
standard_error('domains_cantdeletedomainwithapsinstances');
|
||||||
}
|
}
|
||||||
|
|
||||||
// check for deletion of main-domains which are logically subdomains, #329
|
$query = 'SELECT `id` FROM `' . TABLE_PANEL_DOMAINS . '` WHERE (`id`="' . (int)$id . '" OR `parentdomainid`="' . (int)$id . '") AND `isemaildomain`="1"';
|
||||||
$rsd_sql = '';
|
|
||||||
$remove_subbutmain_domains = isset($_POST['delete_userfiles']) ? 1 : 0;
|
|
||||||
if($remove_subbutmain_domains == 1)
|
|
||||||
{
|
|
||||||
$rsd_sql .= ' OR `ismainbutsubto` = "'.(int)$id.'"';
|
|
||||||
}
|
|
||||||
|
|
||||||
$query = 'SELECT `id` FROM `' . TABLE_PANEL_DOMAINS . '` WHERE (`id`="' . (int)$id . '" OR `parentdomainid`="' . (int)$id . '"'.$rsd_sql.') AND `isemaildomain`="1"';
|
|
||||||
$subResult = $db->query($query);
|
$subResult = $db->query($query);
|
||||||
$idString = array();
|
$idString = array();
|
||||||
|
|
||||||
@@ -185,29 +175,20 @@ if($page == 'domains'
|
|||||||
$log->logAction(ADM_ACTION, LOG_NOTICE, "deleted domain/s from mail-tables");
|
$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'] . "'".$rsd_sql);
|
$db->query("DELETE FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `id`='" . (int)$id . "' OR `parentdomainid`='" . (int)$result['id'] . "'");
|
||||||
$deleted_domains = (int)$db->affected_rows();
|
$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_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_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'] . '\'');
|
$db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `standardsubdomain`=\'0\' WHERE `standardsubdomain`=\'' . (int)$result['id'] . '\' AND `customerid`=\'' . (int)$result['customerid'] . '\'');
|
||||||
$db->query("DELETE FROM `" . TABLE_PANEL_DOMAINREDIRECTS . "` WHERE `did` = '".(int)$id."'");
|
|
||||||
$log->logAction(ADM_ACTION, LOG_INFO, "deleted domain/subdomains (#" . $result['id'] . ")");
|
$log->logAction(ADM_ACTION, LOG_INFO, "deleted domain/subdomains (#" . $result['id'] . ")");
|
||||||
updateCounters();
|
updateCounters();
|
||||||
inserttask('1');
|
inserttask('1');
|
||||||
inserttask('4');
|
inserttask('4');
|
||||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||||
}
|
}
|
||||||
elseif ($alias_check['count'] > 0) {
|
|
||||||
standard_error('domains_cantdeletedomainwithaliases');
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$showcheck = false;
|
ask_yesno('admin_domain_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $idna_convert->decode($result['domain']));
|
||||||
if(domainHasMainSubDomains($id))
|
|
||||||
{
|
|
||||||
$showcheck = true;
|
|
||||||
}
|
|
||||||
ask_yesno_withcheckbox('admin_domain_reallydelete', 'remove_subbutmain_domains', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $idna_convert->decode($result['domain']), $showcheck);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -227,25 +208,11 @@ if($page == 'domains'
|
|||||||
|
|
||||||
$domain = $idna_convert->encode(preg_replace(Array('/\:(\d)+$/', '/^https?\:\/\//'), '', validate($_POST['domain'], 'domain')));
|
$domain = $idna_convert->encode(preg_replace(Array('/\:(\d)+$/', '/^https?\:\/\//'), '', validate($_POST['domain'], 'domain')));
|
||||||
$subcanemaildomain = intval($_POST['subcanemaildomain']);
|
$subcanemaildomain = intval($_POST['subcanemaildomain']);
|
||||||
|
|
||||||
$isemaildomain = 0;
|
|
||||||
if(isset($_POST['isemaildomain']))
|
|
||||||
$isemaildomain = intval($_POST['isemaildomain']);
|
$isemaildomain = intval($_POST['isemaildomain']);
|
||||||
|
$email_only = intval($_POST['email_only']);
|
||||||
$email_only = 0;
|
$wwwserveralias = intval($_POST['wwwserveralias']);
|
||||||
if(isset($_POST['email_only']))
|
$speciallogfile = intval($_POST['speciallogfile']);
|
||||||
$email_only = intval($_POST['email_only']);
|
|
||||||
|
|
||||||
$wwwserveralias = 0;
|
|
||||||
if(isset($_POST['wwwserveralias']))
|
|
||||||
$wwwserveralias = intval($_POST['wwwserveralias']);
|
|
||||||
|
|
||||||
$speciallogfile = 0;
|
|
||||||
if(isset($_POST['speciallogfile']))
|
|
||||||
$speciallogfile = intval($_POST['speciallogfile']);
|
|
||||||
|
|
||||||
$aliasdomain = intval($_POST['alias']);
|
$aliasdomain = intval($_POST['alias']);
|
||||||
$issubof = intval($_POST['issubof']);
|
|
||||||
$customerid = intval($_POST['customerid']);
|
$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'] . "' ") . " ");
|
$customer = $db->query_first("SELECT * FROM `" . TABLE_PANEL_CUSTOMERS . "` WHERE `customerid`='" . (int)$customerid . "' " . ($userinfo['customers_see_all'] ? '' : " AND `adminid` = '" . (int)$userinfo['adminid'] . "' ") . " ");
|
||||||
|
|
||||||
@@ -400,14 +367,7 @@ if($page == 'domains'
|
|||||||
|
|
||||||
if(!preg_match('/^https?\:\/\//', $documentroot))
|
if(!preg_match('/^https?\:\/\//', $documentroot))
|
||||||
{
|
{
|
||||||
if(strstr($documentroot, ":") !== FALSE)
|
$documentroot = makeCorrectDir($documentroot);
|
||||||
{
|
|
||||||
standard_error('pathmaynotcontaincolon');
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$documentroot = makeCorrectDir($documentroot);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$domain_check = $db->query_first("SELECT `id`, `domain` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `domain` = '" . $db->escape(strtolower($domain)) . "'");
|
$domain_check = $db->query_first("SELECT `id`, `domain` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `domain` = '" . $db->escape(strtolower($domain)) . "'");
|
||||||
@@ -418,7 +378,7 @@ if($page == 'domains'
|
|||||||
if($aliasdomain != 0)
|
if($aliasdomain != 0)
|
||||||
{
|
{
|
||||||
// also check ip/port combination to be the same, #176
|
// also check ip/port combination to be the same, #176
|
||||||
$aliasdomain_check = $db->query_first('SELECT `d`.`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 . '\' AND `d`.`ipandport` = \''.(int)$ipandport.'\'');
|
$aliasdomain_check = $db->query_first('SELECT `d`.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 . '\' AND `d`.`ipandport` = \''.(int)$ipandport.'\'');
|
||||||
}
|
}
|
||||||
|
|
||||||
if($openbasedir != '1')
|
if($openbasedir != '1')
|
||||||
@@ -476,18 +436,12 @@ if($page == 'domains'
|
|||||||
{
|
{
|
||||||
$caneditdomain = '0';
|
$caneditdomain = '0';
|
||||||
}
|
}
|
||||||
|
|
||||||
if($issubof <= '0')
|
|
||||||
{
|
|
||||||
$issubof = '0';
|
|
||||||
}
|
|
||||||
|
|
||||||
if($domain == '')
|
if($domain == '')
|
||||||
{
|
{
|
||||||
standard_error(array('stringisempty', 'mydomain'));
|
standard_error(array('stringisempty', 'mydomain'));
|
||||||
}
|
}
|
||||||
/* Check whether domain validation is enabled and if, validate the domain */
|
elseif(!validateDomain($domain))
|
||||||
elseif($settings['system']['validate_domain'] && !validateDomain($domain))
|
|
||||||
{
|
{
|
||||||
standard_error(array('stringiswrong', 'mydomain'));
|
standard_error(array('stringiswrong', 'mydomain'));
|
||||||
}
|
}
|
||||||
@@ -536,15 +490,13 @@ if($page == 'domains'
|
|||||||
'mod_fcgid_starter' => $mod_fcgid_starter,
|
'mod_fcgid_starter' => $mod_fcgid_starter,
|
||||||
'mod_fcgid_maxrequests' => $mod_fcgid_maxrequests,
|
'mod_fcgid_maxrequests' => $mod_fcgid_maxrequests,
|
||||||
'specialsettings' => $specialsettings,
|
'specialsettings' => $specialsettings,
|
||||||
'registration_date' => $registration_date,
|
'registration_date' => $registration_date
|
||||||
'issubof' => $issubof
|
|
||||||
);
|
);
|
||||||
|
|
||||||
$security_questions = array(
|
$security_questions = array(
|
||||||
'reallydisablesecuritysetting' => (($openbasedir == '0' || $safemode == '0') && $userinfo['change_serversettings'] == '1'),
|
'reallydisablesecuritysetting' => (($openbasedir == '0' || $safemode == '0') && $userinfo['change_serversettings'] == '1'),
|
||||||
'reallydocrootoutofcustomerroot' => (substr($documentroot, 0, strlen($customer['documentroot'])) != $customer['documentroot'] && !preg_match('/^https?\:\/\//', $documentroot))
|
'reallydocrootoutofcustomerroot' => (substr($documentroot, 0, strlen($customer['documentroot'])) != $customer['documentroot'] && !preg_match('/^https?\:\/\//', $documentroot))
|
||||||
);
|
);
|
||||||
$question_nr = 1;
|
|
||||||
foreach($security_questions as $question_name => $question_launch)
|
foreach($security_questions as $question_name => $question_launch)
|
||||||
{
|
{
|
||||||
if($question_launch !== false)
|
if($question_launch !== false)
|
||||||
@@ -554,14 +506,13 @@ if($page == 'domains'
|
|||||||
if(!isset($_POST[$question_name])
|
if(!isset($_POST[$question_name])
|
||||||
|| $_POST[$question_name] != $question_name)
|
|| $_POST[$question_name] != $question_name)
|
||||||
{
|
{
|
||||||
ask_yesno('admin_domain_' . $question_name, $filename, $params, $question_nr);
|
ask_yesno('admin_domain_' . $question_name, $filename, $params);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$question_nr++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$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`, `ismainbutsubto`) 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 . "', '".(int)$issubof."')");
|
$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();
|
$domainid = $db->insert_id();
|
||||||
$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)$adminid . "'");
|
||||||
$log->logAction(ADM_ACTION, LOG_INFO, "added domain '" . $domain . "'");
|
$log->logAction(ADM_ACTION, LOG_INFO, "added domain '" . $domain . "'");
|
||||||
@@ -652,14 +603,6 @@ if($page == 'domains'
|
|||||||
{
|
{
|
||||||
$domains.= makeoption($idna_convert->decode($row_domain['domain']) . ' (' . $row_domain['loginname'] . ')', $row_domain['id']);
|
$domains.= makeoption($idna_convert->decode($row_domain['domain']) . ' (' . $row_domain['loginname'] . ')', $row_domain['id']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$subtodomains = makeoption($lng['domains']['nosubtomaindomain'], 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 AND `d`.`ismainbutsubto`=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))
|
|
||||||
{
|
|
||||||
$subtodomains.= makeoption($idna_convert->decode($row_domain['domain']) . ' (' . $row_domain['loginname'] . ')', $row_domain['id']);
|
|
||||||
}
|
|
||||||
|
|
||||||
$phpconfigs = '';
|
$phpconfigs = '';
|
||||||
$configs = $db->query("SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "`");
|
$configs = $db->query("SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "`");
|
||||||
@@ -669,26 +612,20 @@ if($page == 'domains'
|
|||||||
$phpconfigs.= makeoption($row['description'], $row['id'], $settings['system']['mod_fcgid_defaultini'], true, true);
|
$phpconfigs.= makeoption($row['description'], $row['id'], $settings['system']['mod_fcgid_defaultini'], true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
#$isbinddomain = makeyesno('isbinddomain', '1', '0', '1');
|
$isbinddomain = makeyesno('isbinddomain', '1', '0', '1');
|
||||||
#$isemaildomain = makeyesno('isemaildomain', '1', '0', '1');
|
$isemaildomain = makeyesno('isemaildomain', '1', '0', '1');
|
||||||
#$email_only = makeyesno('email_only', '1', '0', '0');
|
$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);
|
$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');
|
$dkim = makeyesno('dkim', '1', '0', '1');
|
||||||
#$wwwserveralias = makeyesno('wwwserveralias', '1', '0', '1');
|
$wwwserveralias = makeyesno('wwwserveralias', '1', '0', '1');
|
||||||
#$caneditdomain = makeyesno('caneditdomain', '1', '0', '1');
|
$caneditdomain = makeyesno('caneditdomain', '1', '0', '1');
|
||||||
#$openbasedir = makeyesno('openbasedir', '1', '0', '1');
|
$openbasedir = makeyesno('openbasedir', '1', '0', '1');
|
||||||
#$safemode = makeyesno('safemode', '1', '0', '1');
|
$safemode = makeyesno('safemode', '1', '0', '1');
|
||||||
#$speciallogfile = makeyesno('speciallogfile', '1', '0', '0');
|
$speciallogfile = makeyesno('speciallogfile', '1', '0', '0');
|
||||||
#$ssl = makeyesno('ssl', '1', '0', '0');
|
$ssl = makeyesno('ssl', '1', '0', '0');
|
||||||
#$ssl_redirect = makeyesno('ssl_redirect', '1', '0', '0');
|
$ssl_redirect = makeyesno('ssl_redirect', '1', '0', '0');
|
||||||
$add_date = date('Y-m-d');
|
$add_date = date('Y-m-d');
|
||||||
|
|
||||||
$domain_add_data = include_once dirname(__FILE__).'/lib/formfields/admin/domains/formfield.domains_add.php';
|
|
||||||
$domain_add_form = htmlform::genHTMLForm($domain_add_data);
|
|
||||||
|
|
||||||
$title = $domain_add_data['domain_add']['title'];
|
|
||||||
$image = $domain_add_data['domain_add']['image'];
|
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("domains/domains_add") . "\";");
|
eval("echo \"" . getTemplate("domains/domains_add") . "\";");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -777,23 +714,13 @@ if($page == 'domains'
|
|||||||
}
|
}
|
||||||
|
|
||||||
$aliasdomain = intval($_POST['alias']);
|
$aliasdomain = intval($_POST['alias']);
|
||||||
$issubof = intval($_POST['issubof']);
|
$isemaildomain = intval($_POST['isemaildomain']);
|
||||||
|
$email_only = intval($_POST['email_only']);
|
||||||
$subcanemaildomain = intval($_POST['subcanemaildomain']);
|
$subcanemaildomain = intval($_POST['subcanemaildomain']);
|
||||||
$caneditdomain = intval($_POST['caneditdomain']);
|
$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', ''));
|
$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', ''));
|
||||||
|
|
||||||
$isemaildomain = 0;
|
|
||||||
if(isset($_POST['isemaildomain']))
|
|
||||||
$isemaildomain = intval($_POST['isemaildomain']);
|
|
||||||
|
|
||||||
$email_only = 0;
|
|
||||||
if(isset($_POST['email_only']))
|
|
||||||
$email_only = intval($_POST['email_only']);
|
|
||||||
|
|
||||||
$wwwserveralias = 0;
|
|
||||||
if(isset($_POST['wwwserveralias']))
|
|
||||||
$wwwserveralias = intval($_POST['wwwserveralias']);
|
|
||||||
|
|
||||||
if($userinfo['change_serversettings'] == '1')
|
if($userinfo['change_serversettings'] == '1')
|
||||||
{
|
{
|
||||||
$isbinddomain = intval($_POST['isbinddomain']);
|
$isbinddomain = intval($_POST['isbinddomain']);
|
||||||
@@ -815,12 +742,6 @@ if($page == 'domains'
|
|||||||
{
|
{
|
||||||
$documentroot = $customer['documentroot'];
|
$documentroot = $customer['documentroot'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!preg_match('/^https?\:\/\//', $documentroot)
|
|
||||||
&& strstr($documentroot, ":") !== FALSE
|
|
||||||
) {
|
|
||||||
standard_error('pathmaynotcontaincolon');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -978,11 +899,6 @@ if($page == 'domains'
|
|||||||
{
|
{
|
||||||
standard_error('domainisaliasorothercustomer');
|
standard_error('domainisaliasorothercustomer');
|
||||||
}
|
}
|
||||||
|
|
||||||
if($issubof <= '0')
|
|
||||||
{
|
|
||||||
$issubof = '0';
|
|
||||||
}
|
|
||||||
|
|
||||||
$params = array(
|
$params = array(
|
||||||
'id' => $id,
|
'id' => $id,
|
||||||
@@ -1010,8 +926,7 @@ if($page == 'domains'
|
|||||||
'mod_fcgid_starter' => $mod_fcgid_starter,
|
'mod_fcgid_starter' => $mod_fcgid_starter,
|
||||||
'mod_fcgid_maxrequests' => $mod_fcgid_maxrequests,
|
'mod_fcgid_maxrequests' => $mod_fcgid_maxrequests,
|
||||||
'specialsettings' => $specialsettings,
|
'specialsettings' => $specialsettings,
|
||||||
'registration_date' => $registration_date,
|
'registration_date' => $registration_date
|
||||||
'issubof' => $issubof
|
|
||||||
);
|
);
|
||||||
|
|
||||||
$security_questions = array(
|
$security_questions = array(
|
||||||
@@ -1045,8 +960,7 @@ if($page == 'domains'
|
|||||||
|| $mod_fcgid_starter != $result['mod_fcgid_starter']
|
|| $mod_fcgid_starter != $result['mod_fcgid_starter']
|
||||||
|| $mod_fcgid_maxrequests != $result['mod_fcgid_maxrequests']
|
|| $mod_fcgid_maxrequests != $result['mod_fcgid_maxrequests']
|
||||||
|| $specialsettings != $result['specialsettings']
|
|| $specialsettings != $result['specialsettings']
|
||||||
|| $aliasdomain != $result['aliasdomain']
|
|| $aliasdomain != $result['aliasdomain'])
|
||||||
|| $issubof != $result['ismainbutsubto'])
|
|
||||||
{
|
{
|
||||||
inserttask('1');
|
inserttask('1');
|
||||||
}
|
}
|
||||||
@@ -1108,7 +1022,7 @@ if($page == 'domains'
|
|||||||
$log->logAction(ADM_ACTION, LOG_INFO, "removed specialsettings on all subdomains of domain #" . $id);
|
$log->logAction(ADM_ACTION, LOG_INFO, "removed specialsettings on all subdomains of domain #" . $id);
|
||||||
}
|
}
|
||||||
|
|
||||||
$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) . "', `ismainbutsubto`='" . (int)$issubof . "' WHERE `id`='" . (int)$id . "'");
|
$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) . "'" . $upd_specialsettings . $updatechildren . " WHERE `parentdomainid`='" . (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) . "'" . $upd_specialsettings . $updatechildren . " WHERE `parentdomainid`='" . (int)$id . "'");
|
||||||
$log->logAction(ADM_ACTION, LOG_INFO, "edited domain #" . $id);
|
$log->logAction(ADM_ACTION, LOG_INFO, "edited domain #" . $id);
|
||||||
$redirect_props = Array(
|
$redirect_props = Array(
|
||||||
@@ -1164,14 +1078,6 @@ if($page == 'domains'
|
|||||||
$domains.= makeoption($idna_convert->decode($row_domain['domain']), $row_domain['id'], $result['aliasdomain']);
|
$domains.= makeoption($idna_convert->decode($row_domain['domain']), $row_domain['id'], $result['aliasdomain']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$subtodomains = makeoption($lng['domains']['nosubtomaindomain'], 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 `c`.`customerid`=`d`.`customerid`". ($userinfo['customers_see_all'] ? '' : " AND `d`.`adminid` = '" . (int)$userinfo['adminid'] . "'") . " ORDER BY `d`.`domain` ASC");
|
|
||||||
|
|
||||||
while($row_domain = $db->fetch_array($result_domains))
|
|
||||||
{
|
|
||||||
$subtodomains.= makeoption($idna_convert->decode($row_domain['domain']), $row_domain['id'], $result['ismainbutsubto']);
|
|
||||||
}
|
|
||||||
|
|
||||||
if($userinfo['ip'] == "-1")
|
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_ipsandports = $db->query("SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `ssl`='0' ORDER BY `ip`, `port` ASC");
|
||||||
@@ -1209,20 +1115,20 @@ if($page == 'domains'
|
|||||||
}
|
}
|
||||||
|
|
||||||
$result['specialsettings'] = $result['specialsettings'];
|
$result['specialsettings'] = $result['specialsettings'];
|
||||||
#$isbinddomain = makeyesno('isbinddomain', '1', '0', $result['isbinddomain']);
|
$isbinddomain = makeyesno('isbinddomain', '1', '0', $result['isbinddomain']);
|
||||||
#$wwwserveralias = makeyesno('wwwserveralias', '1', '0', $result['wwwserveralias']);
|
$wwwserveralias = makeyesno('wwwserveralias', '1', '0', $result['wwwserveralias']);
|
||||||
#$isemaildomain = makeyesno('isemaildomain', '1', '0', $result['isemaildomain']);
|
$isemaildomain = makeyesno('isemaildomain', '1', '0', $result['isemaildomain']);
|
||||||
#$email_only = makeyesno('email_only', '1', '0', $result['email_only']);
|
$email_only = makeyesno('email_only', '1', '0', $result['email_only']);
|
||||||
#$ssl = makeyesno('ssl', '1', '0', $result['ssl']);
|
$ssl = makeyesno('ssl', '1', '0', $result['ssl']);
|
||||||
#$ssl_redirect = makeyesno('ssl_redirect', '1', '0', $result['ssl_redirect']);
|
$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']['never'], '0', $result['subcanemaildomain'], true, true);
|
||||||
$subcanemaildomain.= makeoption($lng['admin']['subcanemaildomain']['choosableno'], '1', $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']['choosableyes'], '2', $result['subcanemaildomain'], true, true);
|
||||||
$subcanemaildomain.= makeoption($lng['admin']['subcanemaildomain']['always'], '3', $result['subcanemaildomain'], true, true);
|
$subcanemaildomain.= makeoption($lng['admin']['subcanemaildomain']['always'], '3', $result['subcanemaildomain'], true, true);
|
||||||
#$dkim = makeyesno('dkim', '1', '0', $result['dkim']);
|
$dkim = makeyesno('dkim', '1', '0', $result['dkim']);
|
||||||
#$caneditdomain = makeyesno('caneditdomain', '1', '0', $result['caneditdomain']);
|
$caneditdomain = makeyesno('caneditdomain', '1', '0', $result['caneditdomain']);
|
||||||
#$openbasedir = makeyesno('openbasedir', '1', '0', $result['openbasedir']);
|
$openbasedir = makeyesno('openbasedir', '1', '0', $result['openbasedir']);
|
||||||
#$safemode = makeyesno('safemode', '1', '0', $result['safemode']);
|
$safemode = makeyesno('safemode', '1', '0', $result['safemode']);
|
||||||
$speciallogfile = ($result['speciallogfile'] == 1 ? $lng['panel']['yes'] : $lng['panel']['no']);
|
$speciallogfile = ($result['speciallogfile'] == 1 ? $lng['panel']['yes'] : $lng['panel']['no']);
|
||||||
$result['add_date'] = date('Y-m-d', $result['add_date']);
|
$result['add_date'] = date('Y-m-d', $result['add_date']);
|
||||||
|
|
||||||
@@ -1234,16 +1140,9 @@ if($page == 'domains'
|
|||||||
$phpconfigs.= makeoption($phpconfigs_row['description'], $phpconfigs_row['id'], $result['phpsettingid'], true, true);
|
$phpconfigs.= makeoption($phpconfigs_row['description'], $phpconfigs_row['id'], $result['phpsettingid'], true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
#$specialsettingsforsubdomains = makeyesno('specialsettingsforsubdomains', '1', '0', '1');
|
$specialsettingsforsubdomains = makeyesno('specialsettingsforsubdomains', '1', '0', '1');
|
||||||
|
|
||||||
$result = htmlentities_array($result);
|
$result = htmlentities_array($result);
|
||||||
|
|
||||||
$domain_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/domains/formfield.domains_edit.php';
|
|
||||||
$domain_edit_form = htmlform::genHTMLForm($domain_edit_data);
|
|
||||||
|
|
||||||
$title = $domain_edit_data['domain_edit']['title'];
|
|
||||||
$image = $domain_edit_data['domain_edit']['image'];
|
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("domains/domains_edit") . "\";");
|
eval("echo \"" . getTemplate("domains/domains_edit") . "\";");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,7 +61,6 @@ if($page == 'overview')
|
|||||||
SUM(`email_accounts_used`) AS `email_accounts_used`,
|
SUM(`email_accounts_used`) AS `email_accounts_used`,
|
||||||
SUM(`email_forwarders_used`) AS `email_forwarders_used`,
|
SUM(`email_forwarders_used`) AS `email_forwarders_used`,
|
||||||
SUM(`email_quota_used`) AS `email_quota_used`,
|
SUM(`email_quota_used`) AS `email_quota_used`,
|
||||||
SUM(`email_autoresponder_used`) AS `email_autoresponder_used`,
|
|
||||||
SUM(`ftps_used`) AS `ftps_used`,
|
SUM(`ftps_used`) AS `ftps_used`,
|
||||||
SUM(`tickets_used`) AS `tickets_used`,
|
SUM(`tickets_used`) AS `tickets_used`,
|
||||||
SUM(`subdomains_used`) AS `subdomains_used`,
|
SUM(`subdomains_used`) AS `subdomains_used`,
|
||||||
@@ -101,7 +100,7 @@ if($page == 'overview')
|
|||||||
&& count($latestversion) >= 1)
|
&& count($latestversion) >= 1)
|
||||||
{
|
{
|
||||||
$_version = $latestversion[0];
|
$_version = $latestversion[0];
|
||||||
$_message = isset($latestversion[1]) ? $latestversion[1] : '';
|
$_message = $latestversion[1];
|
||||||
$_link = isset($latestversion[2]) ? $latestversion[2] : htmlspecialchars($filename . '?s=' . urlencode($s) . '&page=' . urlencode($page) . '&lookfornewversion=yes');
|
$_link = isset($latestversion[2]) ? $latestversion[2] : htmlspecialchars($filename . '?s=' . urlencode($s) . '&page=' . urlencode($page) . '&lookfornewversion=yes');
|
||||||
|
|
||||||
$lookfornewversion_lable = $_version;
|
$lookfornewversion_lable = $_version;
|
||||||
@@ -141,7 +140,7 @@ if($page == 'overview')
|
|||||||
$userinfo['diskspace_used'] = round($userinfo['diskspace_used'] / 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'] = round($userinfo['traffic'] / (1024 * 1024), $settings['panel']['decimal_places']);
|
||||||
$userinfo['traffic_used'] = round($userinfo['traffic_used'] / (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 email_autoresponder ftps tickets subdomains aps_packages');
|
$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');
|
||||||
|
|
||||||
$cron_last_runs = getCronjobsLastRun();
|
$cron_last_runs = getCronjobsLastRun();
|
||||||
$outstanding_tasks = getOutstandingTasks();
|
$outstanding_tasks = getOutstandingTasks();
|
||||||
@@ -186,7 +185,7 @@ if($page == 'overview')
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Try to get the uptime
|
// Try to get the uptime
|
||||||
// First: With exec (let's hope it's enabled for the Froxlor - vHost)
|
// First: With exec (let's hope it's enabled for the SysCP - vHost)
|
||||||
|
|
||||||
$uptime_array = explode(" ", @file_get_contents("/proc/uptime"));
|
$uptime_array = explode(" ", @file_get_contents("/proc/uptime"));
|
||||||
|
|
||||||
@@ -282,47 +281,13 @@ elseif($page == 'change_language')
|
|||||||
{
|
{
|
||||||
$language_options = '';
|
$language_options = '';
|
||||||
|
|
||||||
$default_lang = $settings['panel']['standardlanguage'];
|
|
||||||
if($userinfo['def_language'] != '') {
|
|
||||||
$default_lang = $userinfo['def_language'];
|
|
||||||
}
|
|
||||||
|
|
||||||
while(list($language_file, $language_name) = each($languages))
|
while(list($language_file, $language_name) = each($languages))
|
||||||
{
|
{
|
||||||
$language_options.= makeoption($language_name, $language_file, $default_lang, true);
|
$language_options.= makeoption($language_name, $language_file, $userinfo['def_language'], true);
|
||||||
}
|
}
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("index/change_language") . "\";");
|
eval("echo \"" . getTemplate("index/change_language") . "\";");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elseif($page == 'change_theme')
|
|
||||||
{
|
|
||||||
if(isset($_POST['send'])
|
|
||||||
&& $_POST['send'] == 'send'
|
|
||||||
) {
|
|
||||||
$theme = validate($_POST['theme'], 'theme');
|
|
||||||
|
|
||||||
$db->query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `theme`='" . $db->escape($theme) . "' WHERE `adminid`='" . (int)$userinfo['adminid'] . "'");
|
?>
|
||||||
$db->query("UPDATE `" . TABLE_PANEL_SESSIONS . "` SET `theme`='" . $db->escape($theme) . "' WHERE `hash`='" . $db->escape($s) . "'");
|
|
||||||
|
|
||||||
$log->logAction(ADM_ACTION, LOG_NOTICE, "changed his/her theme to '" . $theme . "'");
|
|
||||||
redirectTo($filename, Array('s' => $s));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$theme_options = '';
|
|
||||||
|
|
||||||
$default_theme = $settings['panel']['default_theme'];
|
|
||||||
if($userinfo['theme'] != '') {
|
|
||||||
$default_theme = $userinfo['theme'];
|
|
||||||
}
|
|
||||||
|
|
||||||
$themes_avail = getThemes();
|
|
||||||
foreach($themes_avail as $t)
|
|
||||||
{
|
|
||||||
$theme_options.= makeoption($t, $t, $default_theme, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("index/change_theme") . "\";");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -141,22 +141,11 @@ if($page == 'ipsandports'
|
|||||||
$vhostcontainer = intval($_POST['vhostcontainer']);
|
$vhostcontainer = intval($_POST['vhostcontainer']);
|
||||||
$specialsettings = validate(str_replace("\r\n", "\n", $_POST['specialsettings']), 'specialsettings', '/^[^\0]*$/');
|
$specialsettings = validate(str_replace("\r\n", "\n", $_POST['specialsettings']), 'specialsettings', '/^[^\0]*$/');
|
||||||
$vhostcontainer_servername_statement = intval($_POST['vhostcontainer_servername_statement']);
|
$vhostcontainer_servername_statement = intval($_POST['vhostcontainer_servername_statement']);
|
||||||
|
$ssl = intval($_POST['ssl']);
|
||||||
|
$ssl_cert_file = validate($_POST['ssl_cert_file'], 'ssl_cert_file');
|
||||||
|
$ssl_key_file = validate($_POST['ssl_key_file'], 'ssl_key_file');
|
||||||
|
$ssl_ca_file = validate($_POST['ssl_ca_file'], 'ssl_ca_file');
|
||||||
$default_vhostconf_domain = validate(str_replace("\r\n", "\n", $_POST['default_vhostconf_domain']), 'default_vhostconf_domain', '/^[^\0]*$/');
|
$default_vhostconf_domain = validate(str_replace("\r\n", "\n", $_POST['default_vhostconf_domain']), 'default_vhostconf_domain', '/^[^\0]*$/');
|
||||||
$docroot = validate($_POST['docroot'], 'docroot');
|
|
||||||
if((int)$settings['system']['use_ssl'] == 1)
|
|
||||||
{
|
|
||||||
$ssl = intval($_POST['ssl']);
|
|
||||||
$ssl_cert_file = validate($_POST['ssl_cert_file'], 'ssl_cert_file');
|
|
||||||
$ssl_key_file = validate($_POST['ssl_key_file'], 'ssl_key_file');
|
|
||||||
$ssl_ca_file = validate($_POST['ssl_ca_file'], 'ssl_ca_file');
|
|
||||||
$ssl_cert_chainfile = validate($_POST['ssl_cert_chainfile'], 'ssl_cert_chainfile');
|
|
||||||
} else {
|
|
||||||
$ssl = 0;
|
|
||||||
$ssl_cert_file = '';
|
|
||||||
$ssl_key_file = '';
|
|
||||||
$ssl_ca_file = '';
|
|
||||||
$ssl_cert_chainfile = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
if($listen_statement != '1')
|
if($listen_statement != '1')
|
||||||
{
|
{
|
||||||
@@ -198,20 +187,6 @@ if($page == 'ipsandports'
|
|||||||
$ssl_ca_file = makeCorrectFile($ssl_ca_file);
|
$ssl_ca_file = makeCorrectFile($ssl_ca_file);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($ssl_cert_chainfile != '')
|
|
||||||
{
|
|
||||||
$ssl_cert_chainfile = makeCorrectFile($ssl_cert_chainfile);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(strlen(trim($docroot)) > 0)
|
|
||||||
{
|
|
||||||
$docroot = makeCorrectDir($docroot);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$docroot = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
$result_checkfordouble = $db->query_first("SELECT `id` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `ip`='" . $db->escape($ip) . "' AND `port`='" . (int)$port . "'");
|
$result_checkfordouble = $db->query_first("SELECT `id` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `ip`='" . $db->escape($ip) . "' AND `port`='" . (int)$port . "'");
|
||||||
|
|
||||||
if($result_checkfordouble['id'] != '')
|
if($result_checkfordouble['id'] != '')
|
||||||
@@ -220,23 +195,7 @@ if($page == 'ipsandports'
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$db->query("INSERT INTO `" . TABLE_PANEL_IPSANDPORTS . "`
|
$db->query("INSERT INTO `" . TABLE_PANEL_IPSANDPORTS . "` (`ip`, `port`, `listen_statement`, `namevirtualhost_statement`, `vhostcontainer`, `vhostcontainer_servername_statement`, `specialsettings`, `ssl`, `ssl_cert_file`, `ssl_key_file`, `ssl_ca_file`, `default_vhostconf_domain`) VALUES ('" . $db->escape($ip) . "', '" . (int)$port . "', '" . (int)$listen_statement . "', '" . (int)$namevirtualhost_statement . "', '" . (int)$vhostcontainer . "', '" . (int)$vhostcontainer_servername_statement . "', '" . $db->escape($specialsettings) . "', '" . (int)$ssl . "', '" . $db->escape($ssl_cert_file) . "', '" . $db->escape($ssl_key_file) . "', '" . $db->escape($ssl_ca_file) . "', '" . $db->escape($default_vhostconf_domain) . "')");
|
||||||
SET
|
|
||||||
`ip` = '" . $db->escape($ip) . "',
|
|
||||||
`port` = '" . (int)$port . "',
|
|
||||||
`listen_statement` = '" . (int)$listen_statement . "',
|
|
||||||
`namevirtualhost_statement` = '" . (int)$namevirtualhost_statement . "',
|
|
||||||
`vhostcontainer` = '" . (int)$vhostcontainer . "',
|
|
||||||
`vhostcontainer_servername_statement` = '" . (int)$vhostcontainer_servername_statement . "',
|
|
||||||
`specialsettings` = '" . $db->escape($specialsettings) . "',
|
|
||||||
`ssl` = '" . (int)$ssl . "',
|
|
||||||
`ssl_cert_file` = '" . $db->escape($ssl_cert_file) . "',
|
|
||||||
`ssl_key_file` = '" . $db->escape($ssl_key_file) . "',
|
|
||||||
`ssl_ca_file` = '" . $db->escape($ssl_ca_file) . "',
|
|
||||||
`ssl_cert_chainfile` = '" . $db->escape($ssl_cert_chainfile) . "',
|
|
||||||
`default_vhostconf_domain` = '" . $db->escape($default_vhostconf_domain) . "',
|
|
||||||
`docroot` = '" . $db->escape($docroot) . "';
|
|
||||||
");
|
|
||||||
|
|
||||||
if(filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6))
|
if(filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6))
|
||||||
{
|
{
|
||||||
@@ -251,18 +210,11 @@ if($page == 'ipsandports'
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#$enable_ssl = makeyesno('ssl', '1', '0', '0');
|
$enable_ssl = makeyesno('ssl', '1', '0', '0');
|
||||||
#$listen_statement = makeyesno('listen_statement', '1', '0', '1');
|
$listen_statement = makeyesno('listen_statement', '1', '0', '1');
|
||||||
#$namevirtualhost_statement = makeyesno('namevirtualhost_statement', '1', '0', '1');
|
$namevirtualhost_statement = makeyesno('namevirtualhost_statement', '1', '0', '1');
|
||||||
#$vhostcontainer = makeyesno('vhostcontainer', '1', '0', '1');
|
$vhostcontainer = makeyesno('vhostcontainer', '1', '0', '1');
|
||||||
#$vhostcontainer_servername_statement = makeyesno('vhostcontainer_servername_statement', '1', '0', '1');
|
$vhostcontainer_servername_statement = makeyesno('vhostcontainer_servername_statement', '1', '0', '1');
|
||||||
|
|
||||||
$ipsandports_add_data = include_once dirname(__FILE__).'/lib/formfields/admin/ipsandports/formfield.ipsandports_add.php';
|
|
||||||
$ipsandports_add_form = htmlform::genHTMLForm($ipsandports_add_data);
|
|
||||||
|
|
||||||
$title = $ipsandports_add_data['ipsandports_add']['title'];
|
|
||||||
$image = $ipsandports_add_data['ipsandports_add']['image'];
|
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("ipsandports/ipsandports_add") . "\";");
|
eval("echo \"" . getTemplate("ipsandports/ipsandports_add") . "\";");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -285,22 +237,11 @@ if($page == 'ipsandports'
|
|||||||
$vhostcontainer = intval($_POST['vhostcontainer']);
|
$vhostcontainer = intval($_POST['vhostcontainer']);
|
||||||
$specialsettings = validate(str_replace("\r\n", "\n", $_POST['specialsettings']), 'specialsettings', '/^[^\0]*$/');
|
$specialsettings = validate(str_replace("\r\n", "\n", $_POST['specialsettings']), 'specialsettings', '/^[^\0]*$/');
|
||||||
$vhostcontainer_servername_statement = intval($_POST['vhostcontainer_servername_statement']);
|
$vhostcontainer_servername_statement = intval($_POST['vhostcontainer_servername_statement']);
|
||||||
|
$ssl = intval($_POST['ssl']);
|
||||||
|
$ssl_cert_file = validate($_POST['ssl_cert_file'], 'ssl_cert_file');
|
||||||
|
$ssl_key_file = validate($_POST['ssl_key_file'], 'ssl_key_file');
|
||||||
|
$ssl_ca_file = validate($_POST['ssl_ca_file'], 'ssl_ca_file');
|
||||||
$default_vhostconf_domain = validate(str_replace("\r\n", "\n", $_POST['default_vhostconf_domain']), 'default_vhostconf_domain', '/^[^\0]*$/');
|
$default_vhostconf_domain = validate(str_replace("\r\n", "\n", $_POST['default_vhostconf_domain']), 'default_vhostconf_domain', '/^[^\0]*$/');
|
||||||
$docroot = validate($_POST['docroot'], 'docroot');
|
|
||||||
if((int)$settings['system']['use_ssl'] == 1)
|
|
||||||
{
|
|
||||||
$ssl = intval($_POST['ssl']);
|
|
||||||
$ssl_cert_file = validate($_POST['ssl_cert_file'], 'ssl_cert_file');
|
|
||||||
$ssl_key_file = validate($_POST['ssl_key_file'], 'ssl_key_file');
|
|
||||||
$ssl_ca_file = validate($_POST['ssl_ca_file'], 'ssl_ca_file');
|
|
||||||
$ssl_cert_chainfile = validate($_POST['ssl_cert_chainfile'], 'ssl_cert_chainfile');
|
|
||||||
} else {
|
|
||||||
$ssl = 0;
|
|
||||||
$ssl_cert_file = '';
|
|
||||||
$ssl_key_file = '';
|
|
||||||
$ssl_ca_file = '';
|
|
||||||
$ssl_cert_chainfile = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
if($listen_statement != '1')
|
if($listen_statement != '1')
|
||||||
{
|
{
|
||||||
@@ -342,20 +283,6 @@ if($page == 'ipsandports'
|
|||||||
$ssl_ca_file = makeCorrectFile($ssl_ca_file);
|
$ssl_ca_file = makeCorrectFile($ssl_ca_file);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($ssl_cert_chainfile != '')
|
|
||||||
{
|
|
||||||
$ssl_cert_chainfile = makeCorrectFile($ssl_cert_chainfile);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(strlen(trim($docroot)) > 0)
|
|
||||||
{
|
|
||||||
$docroot = makeCorrectDir($docroot);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$docroot = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
if($result['ip'] != $ip
|
if($result['ip'] != $ip
|
||||||
&& $result['ip'] == $settings['system']['ipaddress']
|
&& $result['ip'] == $settings['system']['ipaddress']
|
||||||
&& $result_sameipotherport['id'] == '')
|
&& $result_sameipotherport['id'] == '')
|
||||||
@@ -369,26 +296,7 @@ if($page == 'ipsandports'
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
$db->query("UPDATE `" . TABLE_PANEL_IPSANDPORTS . "` SET `ip`='" . $db->escape($ip) . "', `port`='" . (int)$port . "', `listen_statement`='" . (int)$listen_statement . "', `namevirtualhost_statement`='" . (int)$namevirtualhost_statement . "', `vhostcontainer`='" . (int)$vhostcontainer . "', `vhostcontainer_servername_statement`='" . (int)$vhostcontainer_servername_statement . "', `specialsettings`='" . $db->escape($specialsettings) . "', `ssl`='" . (int)$ssl . "', `ssl_cert_file`='" . $db->escape($ssl_cert_file) . "', `ssl_key_file`='" . $db->escape($ssl_key_file) . "', `ssl_ca_file`='" . $db->escape($ssl_ca_file) . "', `default_vhostconf_domain`='" . $db->escape($default_vhostconf_domain) . "' WHERE `id`='" . (int)$id . "'");
|
||||||
$db->query("UPDATE `" . TABLE_PANEL_IPSANDPORTS . "`
|
|
||||||
SET
|
|
||||||
`ip` = '" . $db->escape($ip) . "',
|
|
||||||
`port` = '" . (int)$port . "',
|
|
||||||
`listen_statement` = '" . (int)$listen_statement . "',
|
|
||||||
`namevirtualhost_statement` = '" . (int)$namevirtualhost_statement . "',
|
|
||||||
`vhostcontainer` = '" . (int)$vhostcontainer . "',
|
|
||||||
`vhostcontainer_servername_statement` = '" . (int)$vhostcontainer_servername_statement . "',
|
|
||||||
`specialsettings` = '" . $db->escape($specialsettings) . "',
|
|
||||||
`ssl` = '" . (int)$ssl . "',
|
|
||||||
`ssl_cert_file` = '" . $db->escape($ssl_cert_file) . "',
|
|
||||||
`ssl_key_file` = '" . $db->escape($ssl_key_file) . "',
|
|
||||||
`ssl_ca_file` = '" . $db->escape($ssl_ca_file) . "',
|
|
||||||
`ssl_cert_chainfile` = '" . $db->escape($ssl_cert_chainfile) . "',
|
|
||||||
`default_vhostconf_domain` = '" . $db->escape($default_vhostconf_domain) . "',
|
|
||||||
`docroot` = '" . $db->escape($docroot) . "'
|
|
||||||
WHERE `id`='" . (int)$id . "'
|
|
||||||
");
|
|
||||||
|
|
||||||
$log->logAction(ADM_ACTION, LOG_WARNING, "changed IP/port from '" . $result['ip'] . ":" . $result['port'] . "' to '" . $ip . ":" . $port . "'");
|
$log->logAction(ADM_ACTION, LOG_WARNING, "changed IP/port from '" . $result['ip'] . ":" . $result['port'] . "' to '" . $ip . ":" . $port . "'");
|
||||||
inserttask('1');
|
inserttask('1');
|
||||||
inserttask('4');
|
inserttask('4');
|
||||||
@@ -397,19 +305,12 @@ if($page == 'ipsandports'
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#$enable_ssl = makeyesno('ssl', '1', '0', $result['ssl']);
|
$enable_ssl = makeyesno('ssl', '1', '0', $result['ssl']);
|
||||||
$result = htmlentities_array($result);
|
$result = htmlentities_array($result);
|
||||||
#$listen_statement = makeyesno('listen_statement', '1', '0', $result['listen_statement']);
|
$listen_statement = makeyesno('listen_statement', '1', '0', $result['listen_statement']);
|
||||||
#$namevirtualhost_statement = makeyesno('namevirtualhost_statement', '1', '0', $result['namevirtualhost_statement']);
|
$namevirtualhost_statement = makeyesno('namevirtualhost_statement', '1', '0', $result['namevirtualhost_statement']);
|
||||||
#$vhostcontainer = makeyesno('vhostcontainer', '1', '0', $result['vhostcontainer']);
|
$vhostcontainer = makeyesno('vhostcontainer', '1', '0', $result['vhostcontainer']);
|
||||||
#$vhostcontainer_servername_statement = makeyesno('vhostcontainer_servername_statement', '1', '0', $result['vhostcontainer_servername_statement']);
|
$vhostcontainer_servername_statement = makeyesno('vhostcontainer_servername_statement', '1', '0', $result['vhostcontainer_servername_statement']);
|
||||||
|
|
||||||
$ipsandports_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/ipsandports/formfield.ipsandports_edit.php';
|
|
||||||
$ipsandports_edit_form = htmlform::genHTMLForm($ipsandports_edit_data);
|
|
||||||
|
|
||||||
$title = $ipsandports_edit_data['ipsandports_edit']['title'];
|
|
||||||
$image = $ipsandports_edit_data['ipsandports_edit']['image'];
|
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("ipsandports/ipsandports_edit") . "\";");
|
eval("echo \"" . getTemplate("ipsandports/ipsandports_edit") . "\";");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,10 +31,10 @@ if($page == 'log'
|
|||||||
if($action == '')
|
if($action == '')
|
||||||
{
|
{
|
||||||
$fields = array(
|
$fields = array(
|
||||||
|
'action' => $lng['logger']['action'],
|
||||||
'date' => $lng['logger']['date'],
|
'date' => $lng['logger']['date'],
|
||||||
'type' => $lng['logger']['type'],
|
'type' => $lng['logger']['type'],
|
||||||
'user' => $lng['logger']['user'],
|
'user' => $lng['logger']['user']
|
||||||
'text' => $lng['logger']['action']
|
|
||||||
);
|
);
|
||||||
$paging = new paging($userinfo, $db, TABLE_PANEL_LOG, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
|
$paging = new paging($userinfo, $db, TABLE_PANEL_LOG, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
|
||||||
$paging->sortfield = 'date';
|
$paging->sortfield = 'date';
|
||||||
@@ -167,3 +167,5 @@ if($page == 'log'
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
@@ -39,7 +39,6 @@ if($page == 'overview')
|
|||||||
if($action == '')
|
if($action == '')
|
||||||
{
|
{
|
||||||
$tablecontent = '';
|
$tablecontent = '';
|
||||||
$count = 0;
|
|
||||||
$result = $db->query("SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "`");
|
$result = $db->query("SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "`");
|
||||||
|
|
||||||
while($row = $db->fetch_array($result))
|
while($row = $db->fetch_array($result))
|
||||||
@@ -69,7 +68,6 @@ if($page == 'overview')
|
|||||||
$domains = $lng['admin']['phpsettings']['notused'];
|
$domains = $lng['admin']['phpsettings']['notused'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$count ++;
|
|
||||||
eval("\$tablecontent.=\"" . getTemplate("phpconfig/overview_overview") . "\";");
|
eval("\$tablecontent.=\"" . getTemplate("phpconfig/overview_overview") . "\";");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -105,13 +103,6 @@ if($page == 'overview')
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "` WHERE `id` = 1");
|
$result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "` WHERE `id` = 1");
|
||||||
|
|
||||||
$phpconfig_add_data = include_once dirname(__FILE__).'/lib/formfields/admin/phpconfig/formfield.phpconfig_add.php';
|
|
||||||
$phpconfig_add_form = htmlform::genHTMLForm($phpconfig_add_data);
|
|
||||||
|
|
||||||
$title = $phpconfig_add_data['phpconfig_add']['title'];
|
|
||||||
$image = $phpconfig_add_data['phpconfig_add']['image'];
|
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("phpconfig/overview_add") . "\";");
|
eval("echo \"" . getTemplate("phpconfig/overview_add") . "\";");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -181,12 +172,6 @@ if($page == 'overview')
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$phpconfig_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/phpconfig/formfield.phpconfig_edit.php';
|
|
||||||
$phpconfig_edit_form = htmlform::genHTMLForm($phpconfig_edit_data);
|
|
||||||
|
|
||||||
$title = $phpconfig_edit_data['phpconfig_edit']['title'];
|
|
||||||
$image = $phpconfig_edit_data['phpconfig_edit']['image'];
|
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("phpconfig/overview_edit") . "\";");
|
eval("echo \"" . getTemplate("phpconfig/overview_edit") . "\";");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,11 +75,6 @@ if(($page == 'settings' || $page == 'overview')
|
|||||||
$only_enabledisable
|
$only_enabledisable
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
$log->logAction(ADM_ACTION, LOG_INFO, "rebuild configfiles due to changed setting");
|
|
||||||
inserttask('1');
|
|
||||||
inserttask('4');
|
|
||||||
inserttask('5');
|
|
||||||
inserttask('9');
|
|
||||||
standard_success('settingssaved', '', array('filename' => $filename, 'action' => $action, 'page' => $page));
|
standard_success('settingssaved', '', array('filename' => $filename, 'action' => $action, 'page' => $page));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -120,8 +115,7 @@ elseif($page == 'rebuildconfigs'
|
|||||||
inserttask('1');
|
inserttask('1');
|
||||||
inserttask('4');
|
inserttask('4');
|
||||||
inserttask('5');
|
inserttask('5');
|
||||||
inserttask('9');
|
redirectTo('admin_index.php', array('s' => $s));
|
||||||
standard_success('rebuildingconfigs', '', array('filename' => 'admin_index.php'));
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -221,3 +215,5 @@ elseif($page == 'enforcequotas'
|
|||||||
ask_yesno('admin_quotas_reallyenforce', $filename, array('page' => $page));
|
ask_yesno('admin_quotas_reallyenforce', $filename, array('page' => $page));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
@@ -48,16 +48,12 @@ elseif(isset($_GET['id']))
|
|||||||
$available_templates = array(
|
$available_templates = array(
|
||||||
'createcustomer',
|
'createcustomer',
|
||||||
'pop_success',
|
'pop_success',
|
||||||
'trafficmaxpercent',
|
'trafficninetypercent',
|
||||||
'diskmaxpercent',
|
|
||||||
'new_ticket_by_customer',
|
'new_ticket_by_customer',
|
||||||
'new_ticket_for_customer',
|
'new_ticket_for_customer',
|
||||||
'new_ticket_by_staff',
|
'new_ticket_by_staff',
|
||||||
'new_reply_ticket_by_customer',
|
'new_reply_ticket_by_customer',
|
||||||
'new_reply_ticket_by_staff',
|
'new_reply_ticket_by_staff'
|
||||||
'new_database_by_customer',
|
|
||||||
'new_ftpaccount_by_customer',
|
|
||||||
'password_reset'
|
|
||||||
);
|
);
|
||||||
$file_templates = array(
|
$file_templates = array(
|
||||||
'index_html'
|
'index_html'
|
||||||
@@ -152,7 +148,7 @@ elseif($action == 'delete'
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elseif($action == 'deletef'
|
elseif($action == 'delete'
|
||||||
&& $id != 0)
|
&& $id != 0)
|
||||||
{
|
{
|
||||||
//file templates
|
//file templates
|
||||||
@@ -209,12 +205,6 @@ elseif($action == 'add')
|
|||||||
$template_options.= makeoption($lng['admin']['templates'][$template], $template, NULL, true);
|
$template_options.= makeoption($lng['admin']['templates'][$template], $template, NULL, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
$template_add_data = include_once dirname(__FILE__).'/lib/formfields/admin/templates/formfield.template_add.php';
|
|
||||||
$template_add_form = htmlform::genHTMLForm($template_add_data);
|
|
||||||
|
|
||||||
$title = $template_add_data['template_add']['title'];
|
|
||||||
$image = $template_add_data['template_add']['image'];
|
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("templates/templates_add_2") . "\";");
|
eval("echo \"" . getTemplate("templates/templates_add_2") . "\";");
|
||||||
}
|
}
|
||||||
elseif(isset($_POST['send'])
|
elseif(isset($_POST['send'])
|
||||||
@@ -318,12 +308,6 @@ elseif($action == 'add')
|
|||||||
$free_templates.= makeoption($lng['admin']['templates'][$template], $template, '', true);
|
$free_templates.= makeoption($lng['admin']['templates'][$template], $template, '', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
$filetemplate_add_data = include_once dirname(__FILE__).'/lib/formfields/admin/templates/formfield.filetemplate_add.php';
|
|
||||||
$filetemplate_add_form = htmlform::genHTMLForm($filetemplate_add_data);
|
|
||||||
|
|
||||||
$title = $filetemplate_add_data['filetemplate_add']['title'];
|
|
||||||
$image = $filetemplate_add_data['filetemplate_add']['image'];
|
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("templates/filetemplates_add") . "\";");
|
eval("echo \"" . getTemplate("templates/filetemplates_add") . "\";");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -356,18 +340,11 @@ elseif($action == 'edit'
|
|||||||
$result = $db->query_first("SELECT `language`, `varname`, `value` FROM `" . TABLE_PANEL_TEMPLATES . "` WHERE `id`='$mailbodyid'");
|
$result = $db->query_first("SELECT `language`, `varname`, `value` FROM `" . TABLE_PANEL_TEMPLATES . "` WHERE `id`='$mailbodyid'");
|
||||||
$result = htmlentities_array($result);
|
$result = htmlentities_array($result);
|
||||||
$mailbody = $result['value'];
|
$mailbody = $result['value'];
|
||||||
|
|
||||||
$template_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/templates/formfield.template_edit.php';
|
|
||||||
$template_edit_form = htmlform::genHTMLForm($template_edit_data);
|
|
||||||
|
|
||||||
$title = $template_edit_data['template_edit']['title'];
|
|
||||||
$image = $template_edit_data['template_edit']['image'];
|
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("templates/templates_edit") . "\";");
|
eval("echo \"" . getTemplate("templates/templates_edit") . "\";");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elseif($action == 'editf'
|
elseif($action == 'edit'
|
||||||
&& $id != 0)
|
&& $id != 0)
|
||||||
{
|
{
|
||||||
//file templates
|
//file templates
|
||||||
@@ -391,13 +368,6 @@ elseif($action == 'editf'
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$row = htmlentities_array($row);
|
$row = htmlentities_array($row);
|
||||||
|
|
||||||
$filetemplate_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/templates/formfield.filetemplate_edit.php';
|
|
||||||
$filetemplate_edit_form = htmlform::genHTMLForm($filetemplate_edit_data);
|
|
||||||
|
|
||||||
$title = $filetemplate_edit_data['filetemplate_edit']['title'];
|
|
||||||
$image = $filetemplate_edit_data['filetemplate_edit']['image'];
|
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("templates/filetemplates_edit") . "\";");
|
eval("echo \"" . getTemplate("templates/filetemplates_edit") . "\";");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -407,3 +377,5 @@ elseif($action == 'editf'
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
@@ -56,7 +56,7 @@ if($page == 'tickets'
|
|||||||
$paging = new paging($userinfo, $db, TABLE_PANEL_TICKETS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
|
$paging = new paging($userinfo, $db, TABLE_PANEL_TICKETS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
|
||||||
$paging->sortfield = 'lastchange';
|
$paging->sortfield = 'lastchange';
|
||||||
$paging->sortorder = 'desc';
|
$paging->sortorder = 'desc';
|
||||||
$result = $db->query('SELECT `main`.`id`, `main`.`customerid`, (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" ' . ($userinfo['customers_see_all'] ? '' : ' AND `adminid` = "' . (int)$userinfo['adminid'] . '"') . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
|
$result = $db->query('SELECT `main`.`id`, `main`.`customerid`, (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 `adminid` = "' . (int)$userinfo['adminid'] . '" ' . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
|
||||||
$paging->setEntries($db->num_rows($result));
|
$paging->setEntries($db->num_rows($result));
|
||||||
$sortcode = $paging->getHtmlSortCode($lng);
|
$sortcode = $paging->getHtmlSortCode($lng);
|
||||||
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
|
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
|
||||||
@@ -140,7 +140,6 @@ if($page == 'tickets'
|
|||||||
$cananswer = 1;
|
$cananswer = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$row['subject'] = html_entity_decode($row['subject']);
|
|
||||||
if(strlen($row['subject']) > 20)
|
if(strlen($row['subject']) > 20)
|
||||||
{
|
{
|
||||||
$row['subject'] = substr($row['subject'], 0, 17) . '...';
|
$row['subject'] = substr($row['subject'], 0, 17) . '...';
|
||||||
@@ -169,7 +168,7 @@ if($page == 'tickets'
|
|||||||
$newticket->Set('subject', validate($_POST['subject'], 'subject'), true, false);
|
$newticket->Set('subject', validate($_POST['subject'], 'subject'), true, false);
|
||||||
$newticket->Set('priority', validate($_POST['priority'], 'priority'), true, false);
|
$newticket->Set('priority', validate($_POST['priority'], 'priority'), true, false);
|
||||||
$newticket->Set('category', validate($_POST['category'], 'category'), true, false);
|
$newticket->Set('category', validate($_POST['category'], 'category'), true, false);
|
||||||
$newticket->Set('customer', (int)$_POST['customer'], true, false);
|
$newticket->Set('customer', validate($_POST['customer'], 'customer'), true, false);
|
||||||
$newticket->Set('message', validate(str_replace("\r\n", "\n", $_POST['message']), 'message', '/^[^\0]*$/'), true, false);
|
$newticket->Set('message', validate(str_replace("\r\n", "\n", $_POST['message']), 'message', '/^[^\0]*$/'), true, false);
|
||||||
|
|
||||||
if($newticket->Get('subject') == null)
|
if($newticket->Get('subject') == null)
|
||||||
@@ -227,13 +226,6 @@ if($page == 'tickets'
|
|||||||
$priorities = makeoption($lng['ticket']['unf_high'], '1', $settings['ticket']['default_priority']);
|
$priorities = makeoption($lng['ticket']['unf_high'], '1', $settings['ticket']['default_priority']);
|
||||||
$priorities.= makeoption($lng['ticket']['unf_normal'], '2', $settings['ticket']['default_priority']);
|
$priorities.= makeoption($lng['ticket']['unf_normal'], '2', $settings['ticket']['default_priority']);
|
||||||
$priorities.= makeoption($lng['ticket']['unf_low'], '3', $settings['ticket']['default_priority']);
|
$priorities.= makeoption($lng['ticket']['unf_low'], '3', $settings['ticket']['default_priority']);
|
||||||
|
|
||||||
$ticket_new_data = include_once dirname(__FILE__).'/lib/formfields/admin/ticket/formfield.ticket_new.php';
|
|
||||||
$ticket_new_form = htmlform::genHTMLForm($ticket_new_data);
|
|
||||||
|
|
||||||
$title = $ticket_new_data['ticket_new']['title'];
|
|
||||||
$image = $ticket_new_data['ticket_new']['image'];
|
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("ticket/tickets_new") . "\";");
|
eval("echo \"" . getTemplate("ticket/tickets_new") . "\";");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -345,11 +337,6 @@ if($page == 'tickets'
|
|||||||
$ticket_replies_count = $db->num_rows($andere) + 1;
|
$ticket_replies_count = $db->num_rows($andere) + 1;
|
||||||
|
|
||||||
// don't forget the main-ticket!
|
// don't forget the main-ticket!
|
||||||
$ticket_reply_data = include_once dirname(__FILE__).'/lib/formfields/admin/ticket/formfield.ticket_reply.php';
|
|
||||||
$ticket_reply_form = htmlform::genHTMLForm($ticket_reply_data);
|
|
||||||
|
|
||||||
$title = $ticket_reply_data['ticket_reply']['title'];
|
|
||||||
$image = $ticket_reply_data['ticket_reply']['image'];
|
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("ticket/tickets_reply") . "\";");
|
eval("echo \"" . getTemplate("ticket/tickets_reply") . "\";");
|
||||||
}
|
}
|
||||||
@@ -485,8 +472,7 @@ elseif($page == 'categories'
|
|||||||
|
|
||||||
if($order < 1 || $order >= 1000)
|
if($order < 1 || $order >= 1000)
|
||||||
{
|
{
|
||||||
// use the latest available
|
$order = 1;
|
||||||
$order = ticket::getHighestOrderNumber($db) + 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if($category == '')
|
if($category == '')
|
||||||
@@ -502,14 +488,6 @@ elseif($page == 'categories'
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$order = ticket::getHighestOrderNumber($db) + 1;
|
|
||||||
|
|
||||||
$category_new_data = include_once dirname(__FILE__).'/lib/formfields/admin/ticket/formfield.category_new.php';
|
|
||||||
$category_new_form = htmlform::genHTMLForm($category_new_data);
|
|
||||||
|
|
||||||
$title = $category_new_data['category_new']['title'];
|
|
||||||
$image = $category_new_data['category_new']['image'];
|
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("ticket/tickets_newcategory") . "\";");
|
eval("echo \"" . getTemplate("ticket/tickets_newcategory") . "\";");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -541,13 +519,6 @@ elseif($page == 'categories'
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$row = $db->query_first('SELECT * FROM `' . TABLE_PANEL_TICKET_CATS . '` WHERE `id` = "' . (int)$id . '"');
|
$row = $db->query_first('SELECT * FROM `' . TABLE_PANEL_TICKET_CATS . '` WHERE `id` = "' . (int)$id . '"');
|
||||||
|
|
||||||
$category_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/ticket/formfield.category_edit.php';
|
|
||||||
$category_edit_form = htmlform::genHTMLForm($category_edit_data);
|
|
||||||
|
|
||||||
$title = $category_edit_data['category_edit']['title'];
|
|
||||||
$image = $category_edit_data['category_edit']['image'];
|
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("ticket/tickets_editcategory") . "\";");
|
eval("echo \"" . getTemplate("ticket/tickets_editcategory") . "\";");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -597,7 +568,8 @@ elseif($page == 'archive'
|
|||||||
{
|
{
|
||||||
$categories[$x] = isset($_POST['category' . $x]) ? $_POST['category' . $x] : '';
|
$categories[$x] = isset($_POST['category' . $x]) ? $_POST['category' . $x] : '';
|
||||||
}
|
}
|
||||||
$query = ticket::getArchiveSearchStatement($db, $subject, $priority, $fromdate, $todate, $message, $customer, $userinfo['adminid'], $categories);
|
|
||||||
|
$query = ticket::getArchiveSearchStatement($subject, $priority, $fromdate, $todate, $message, $customer, $userinfo['adminid'], $categories);
|
||||||
$fields = array(
|
$fields = array(
|
||||||
'lastchange' => $lng['ticket']['lastchange'],
|
'lastchange' => $lng['ticket']['lastchange'],
|
||||||
'ticket_answers' => $lng['ticket']['ticket_answers'],
|
'ticket_answers' => $lng['ticket']['ticket_answers'],
|
||||||
@@ -655,6 +627,7 @@ elseif($page == 'archive'
|
|||||||
{
|
{
|
||||||
if($paging->checkDisplay($i))
|
if($paging->checkDisplay($i))
|
||||||
{
|
{
|
||||||
|
$ticket = htmlentities_array($ticket);
|
||||||
$ticket['lastchange'] = date("d.m.y H:i", $ticket['lastchange']);
|
$ticket['lastchange'] = date("d.m.y H:i", $ticket['lastchange']);
|
||||||
|
|
||||||
if($_cid != $ticket['customerid'])
|
if($_cid != $ticket['customerid'])
|
||||||
@@ -689,8 +662,6 @@ elseif($page == 'archive'
|
|||||||
$ticket['subject'] = substr($ticket['subject'], 0, 17) . '...';
|
$ticket['subject'] = substr($ticket['subject'], 0, 17) . '...';
|
||||||
}
|
}
|
||||||
|
|
||||||
$ticket = htmlentities_array($ticket);
|
|
||||||
|
|
||||||
eval("\$tickets.=\"" . getTemplate("ticket/archived_tickets") . "\";");
|
eval("\$tickets.=\"" . getTemplate("ticket/archived_tickets") . "\";");
|
||||||
$count++;
|
$count++;
|
||||||
$_cid = $ticket['customerid'];
|
$_cid = $ticket['customerid'];
|
||||||
@@ -777,8 +748,8 @@ elseif($page == 'archive'
|
|||||||
$by = $lng['ticket']['customer'];
|
$by = $lng['ticket']['customer'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$subject = htmlentities($mainticket->Get('subject'));
|
$subject = $mainticket->Get('subject');
|
||||||
$message = htmlentities($mainticket->Get('message'));
|
$message = $mainticket->Get('message');
|
||||||
eval("\$ticket_replies.=\"" . getTemplate("ticket/tickets_tickets_main") . "\";");
|
eval("\$ticket_replies.=\"" . getTemplate("ticket/tickets_tickets_main") . "\";");
|
||||||
$result = $db->query('SELECT `name` FROM `' . TABLE_PANEL_TICKET_CATS . '`
|
$result = $db->query('SELECT `name` FROM `' . TABLE_PANEL_TICKET_CATS . '`
|
||||||
WHERE `id`="' . (int)$mainticket->Get('category') . '"');
|
WHERE `id`="' . (int)$mainticket->Get('category') . '"');
|
||||||
@@ -799,15 +770,15 @@ elseif($page == 'archive'
|
|||||||
$by = $lng['ticket']['customer'];
|
$by = $lng['ticket']['customer'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$subject = htmlentities($subticket->Get('subject'));
|
$subject = $subticket->Get('subject');
|
||||||
$message = htmlentities($subticket->Get('message'));
|
$message = $subticket->Get('message');
|
||||||
eval("\$ticket_replies.=\"" . getTemplate("ticket/tickets_tickets_list") . "\";");
|
eval("\$ticket_replies.=\"" . getTemplate("ticket/tickets_tickets_list") . "\";");
|
||||||
}
|
}
|
||||||
|
|
||||||
$priorities = makeoption($lng['ticket']['high'], '1', htmlentities($mainticket->Get('priority')), true, true);
|
$priorities = makeoption($lng['ticket']['high'], '1', $mainticket->Get('priority'), true, true);
|
||||||
$priorities.= makeoption($lng['ticket']['normal'], '2', htmlentities($mainticket->Get('priority')), true, true);
|
$priorities.= makeoption($lng['ticket']['normal'], '2', $mainticket->Get('priority'), true, true);
|
||||||
$priorities.= makeoption($lng['ticket']['low'], '3', htmlentities($mainticket->Get('priority')), true, true);
|
$priorities.= makeoption($lng['ticket']['low'], '3', $mainticket->Get('priority'), true, true);
|
||||||
$subject = htmlentities($mainticket->Get('subject'));
|
$subject = $mainticket->Get('subject');
|
||||||
$ticket_replies_count = $db->num_rows($andere) + 1;
|
$ticket_replies_count = $db->num_rows($andere) + 1;
|
||||||
|
|
||||||
// don't forget the main-ticket!
|
// don't forget the main-ticket!
|
||||||
|
|||||||
@@ -1,148 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This file is part of the Froxlor project.
|
|
||||||
* Copyright (c) 2003-2009 the SysCP Team (see authors).
|
|
||||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the COPYING
|
|
||||||
* file that was distributed with this source code. You can also view the
|
|
||||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
|
||||||
*
|
|
||||||
* @copyright (c) the authors
|
|
||||||
* @author Morton Jonuschat <m.jonuschat@chrome-it.de>
|
|
||||||
* @license GPLv2 http://files.syscp.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')
|
|
||||||
{
|
|
||||||
$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']);
|
|
||||||
}
|
|
||||||
|
|
||||||
$months = array(
|
|
||||||
'0' => 'empty',
|
|
||||||
'1' => 'jan',
|
|
||||||
'2' => 'feb',
|
|
||||||
'3' => 'mar',
|
|
||||||
'4' => 'apr',
|
|
||||||
'5' => 'may',
|
|
||||||
'6' => 'jun',
|
|
||||||
'7' => 'jul',
|
|
||||||
'8' => 'aug',
|
|
||||||
'9' => 'sep',
|
|
||||||
'10' => 'oct',
|
|
||||||
'11' => 'nov',
|
|
||||||
'12' => 'dec',
|
|
||||||
);
|
|
||||||
|
|
||||||
if($page == 'overview' || $page == 'customers')
|
|
||||||
{
|
|
||||||
if($action == 'su' && $id != 0)
|
|
||||||
{
|
|
||||||
$result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_CUSTOMERS . "` WHERE `customerid`='" . (int)$id . "' " . ($userinfo['customers_see_all'] ? '' : " AND `adminid` = '" . (int)$userinfo['adminid'] . "' "));
|
|
||||||
|
|
||||||
if($result['loginname'] != '')
|
|
||||||
{
|
|
||||||
$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']) . "', '0')");
|
|
||||||
redirectTo('customer_traffic.php', Array(
|
|
||||||
's' => $s
|
|
||||||
));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
redirectTo('index.php', Array(
|
|
||||||
'action' => 'login'
|
|
||||||
));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$customerview = 1;
|
|
||||||
$stats_tables = '';
|
|
||||||
$minyear = $db->query_first("SELECT `year` FROM `". TABLE_PANEL_TRAFFIC . "` ORDER BY `year` ASC LIMIT 1");
|
|
||||||
if (!isset($minyear['year']) || $minyear['year'] == 0)
|
|
||||||
{
|
|
||||||
$maxyears = 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$maxyears = date("Y") - $minyear['year'];
|
|
||||||
}
|
|
||||||
for($years = 0; $years<=$maxyears; $years++) {
|
|
||||||
$overview['year'] = date("Y")-$years;
|
|
||||||
$overview['type'] = $lng['traffic']['customer'];
|
|
||||||
$domain_list = '';
|
|
||||||
$customer_name_list = $db->query("SELECT `customerid`,`company`,`name`,`firstname` FROM `" . TABLE_PANEL_CUSTOMERS . "` WHERE `deactivated`='0'" . ($userinfo['customers_see_all'] ? '' : " AND `adminid` = '" . (int)$userinfo['adminid'] . "' ") . " ORDER BY name");
|
|
||||||
$totals = array(
|
|
||||||
'jan' => 0,
|
|
||||||
'feb' => 0,
|
|
||||||
'mar' => 0,
|
|
||||||
'apr' => 0,
|
|
||||||
'may' => 0,
|
|
||||||
'jun' => 0,
|
|
||||||
'jul' => 0,
|
|
||||||
'aug' => 0,
|
|
||||||
'sep' => 0,
|
|
||||||
'oct' => 0,
|
|
||||||
'nov' => 0,
|
|
||||||
'dec' => 0,
|
|
||||||
);
|
|
||||||
while($customer_name = $db->fetch_array($customer_name_list)) {
|
|
||||||
$virtual_host = array(
|
|
||||||
'name' => ($customer_name['company'] == '' ? $customer_name['name'] . ", " . $customer_name['firstname'] : $customer_name['company']),
|
|
||||||
'customerid' => $customer_name['customerid'],
|
|
||||||
'jan' => '-',
|
|
||||||
'feb' => '-',
|
|
||||||
'mar' => '-',
|
|
||||||
'apr' => '-',
|
|
||||||
'may' => '-',
|
|
||||||
'jun' => '-',
|
|
||||||
'jul' => '-',
|
|
||||||
'aug' => '-',
|
|
||||||
'sep' => '-',
|
|
||||||
'oct' => '-',
|
|
||||||
'nov' => '-',
|
|
||||||
'dec' => '-',
|
|
||||||
);
|
|
||||||
|
|
||||||
$traffic_list = $db->query("SELECT month, SUM(http+ftp_up+ftp_down+mail)*1024 AS traffic FROM `" . TABLE_PANEL_TRAFFIC . "` WHERE year = " . (date("Y")-$years) . " AND `customerid` = '" . $customer_name['customerid'] . "' GROUP BY month ORDER BY month");
|
|
||||||
while($traffic_month = $db->fetch_array($traffic_list)) {
|
|
||||||
$virtual_host[$months[(int)$traffic_month['month']]] = size_readable($traffic_month['traffic'], 'GiB', 'bi', '%01.3f %s');
|
|
||||||
$totals[$months[(int)$traffic_month['month']]] += $traffic_month['traffic'];
|
|
||||||
}
|
|
||||||
eval("\$domain_list .= sprintf(\"%s\", \"" . getTemplate("traffic/index_table_row") . "\");");
|
|
||||||
}
|
|
||||||
// sum up totals
|
|
||||||
$virtual_host = array(
|
|
||||||
'name' => $lng['traffic']['months']['total'],
|
|
||||||
);
|
|
||||||
foreach($totals as $month => $bytes) {
|
|
||||||
$virtual_host[$month] = ($bytes == 0 ? '-' : size_readable($bytes, 'GiB', 'bi', '%01.3f %s'));
|
|
||||||
}
|
|
||||||
$customerview = 0;
|
|
||||||
eval("\$total_list = sprintf(\"%s\", \"" . getTemplate("traffic/index_table_row") . "\");");
|
|
||||||
eval("\$stats_tables .= sprintf(\"%s\", \"" . getTemplate("traffic/index_table") . "\");");
|
|
||||||
}
|
|
||||||
eval("echo \"" . getTemplate("traffic/index") . "\";");
|
|
||||||
}
|
|
||||||
@@ -87,7 +87,6 @@ if($action == "add")
|
|||||||
`subject` = '" . $db->escape($subject) . "',
|
`subject` = '" . $db->escape($subject) . "',
|
||||||
`customerid` = '" . $db->escape((int)$userinfo['customerid']) . "'
|
`customerid` = '" . $db->escape((int)$userinfo['customerid']) . "'
|
||||||
");
|
");
|
||||||
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `email_autoresponder_used` = `email_autoresponder_used` + 1 WHERE `customerid` = '" . $db->escape((int)$userinfo['customerid']). "'");
|
|
||||||
redirectTo($filename, Array('s' => $s));
|
redirectTo($filename, Array('s' => $s));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -108,16 +107,8 @@ if($action == "add")
|
|||||||
}
|
}
|
||||||
|
|
||||||
$date_from_off = makecheckbox('date_from_off', $lng['panel']['not_activated'], '-1', false, '-1', true, true);
|
$date_from_off = makecheckbox('date_from_off', $lng['panel']['not_activated'], '-1', false, '-1', true, true);
|
||||||
$date_until_off = makecheckbox('date_until_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);
|
||||||
|
|
||||||
#$isactive = makeyesno('active', '1', '0', '1');
|
|
||||||
|
|
||||||
$autoresponder_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/email/formfield.emails_addautoresponder.php';
|
|
||||||
$autoresponder_add_form = htmlform::genHTMLForm($autoresponder_add_data);
|
|
||||||
|
|
||||||
$title = $autoresponder_add_data['autoresponder_add']['title'];
|
|
||||||
$image = $autoresponder_add_data['autoresponder_add']['image'];
|
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("email/autoresponder_add") . "\";");
|
eval("echo \"" . getTemplate("email/autoresponder_add") . "\";");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -220,7 +211,6 @@ if($action == "edit")
|
|||||||
if($date_from == -1)
|
if($date_from == -1)
|
||||||
{
|
{
|
||||||
$deactivated = '-1';
|
$deactivated = '-1';
|
||||||
$date_from = '';
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -232,22 +222,21 @@ if($action == "edit")
|
|||||||
if($date_until == -1)
|
if($date_until == -1)
|
||||||
{
|
{
|
||||||
$deactivated = '-1';
|
$deactivated = '-1';
|
||||||
$date_until = '';
|
$date_until = '-1';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$deactivated = '0';
|
$deactivated = '0';
|
||||||
$date_until = date('d-m-Y', $date_until);
|
$date_until = date('d-m-Y', $date_until);
|
||||||
}
|
}
|
||||||
$date_until_off = makecheckbox('date_until_off', $lng['panel']['not_activated'], '-1', false, $deactivated, true, true);
|
$date_from_off = makecheckbox('date_until_off', $lng['panel']['not_activated'], '-1', false, $deactivated, true, true);
|
||||||
|
|
||||||
#$isactive = makeyesno('active', '1', '0', $row['enabled']);
|
|
||||||
|
|
||||||
$autoresponder_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/email/formfield.emails_editautoresponder.php';
|
$checked = '';
|
||||||
$autoresponder_edit_form = htmlform::genHTMLForm($autoresponder_edit_data);
|
|
||||||
|
|
||||||
$title = $autoresponder_edit_data['autoresponder_edit']['title'];
|
if($row['enabled'] == 1)
|
||||||
$image = $autoresponder_edit_data['autoresponder_edit']['image'];
|
{
|
||||||
|
$checked = "checked=\"checked\"";
|
||||||
|
}
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("email/autoresponder_edit") . "\";");
|
eval("echo \"" . getTemplate("email/autoresponder_edit") . "\";");
|
||||||
}
|
}
|
||||||
@@ -276,7 +265,6 @@ if($action == "delete")
|
|||||||
WHERE `email` = '" . $db->escape($account) . "'
|
WHERE `email` = '" . $db->escape($account) . "'
|
||||||
AND `customerid` = '" . $db->escape((int)$userinfo['customerid']) . "'
|
AND `customerid` = '" . $db->escape((int)$userinfo['customerid']) . "'
|
||||||
");
|
");
|
||||||
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `email_autoresponder_used` = `email_autoresponder_used` - 1 WHERE `customerid` = '" . $db->escape((int)$userinfo['customerid']). "'");
|
|
||||||
redirectTo($filename, Array('s' => $s));
|
redirectTo($filename, Array('s' => $s));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -289,7 +277,6 @@ if($action == "delete")
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$autoresponder = '';
|
$autoresponder = '';
|
||||||
$count = 0;
|
|
||||||
$result = $db->query("SELECT * FROM `" . TABLE_MAIL_AUTORESPONDER . "` WHERE `customerid` = '" . (int)$userinfo['customerid'] . "' ORDER BY email ASC");
|
$result = $db->query("SELECT * FROM `" . TABLE_MAIL_AUTORESPONDER . "` WHERE `customerid` = '" . (int)$userinfo['customerid'] . "' ORDER BY email ASC");
|
||||||
|
|
||||||
while($row = $db->fetch_array($result))
|
while($row = $db->fetch_array($result))
|
||||||
@@ -311,8 +298,9 @@ else
|
|||||||
$activated_date = date('d-m-Y', $row['date_from']) . ' - ' . date('d-m-Y', $row['date_until']);
|
$activated_date = date('d-m-Y', $row['date_from']) . ' - ' . date('d-m-Y', $row['date_until']);
|
||||||
}
|
}
|
||||||
eval("\$autoresponder.=\"" . getTemplate("email/autoresponder_autoresponder") . "\";");
|
eval("\$autoresponder.=\"" . getTemplate("email/autoresponder_autoresponder") . "\";");
|
||||||
$count++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("email/autoresponder") . "\";");
|
eval("echo \"" . getTemplate("email/autoresponder") . "\";");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
@@ -226,7 +226,6 @@ elseif($page == 'domains')
|
|||||||
$aliasdomain_check = array(
|
$aliasdomain_check = array(
|
||||||
'id' => 0
|
'id' => 0
|
||||||
);
|
);
|
||||||
$_doredirect = false;
|
|
||||||
|
|
||||||
if($aliasdomain != 0)
|
if($aliasdomain != 0)
|
||||||
{
|
{
|
||||||
@@ -239,7 +238,6 @@ elseif($page == 'domains')
|
|||||||
&& validateUrl($idna_convert->encode($_POST['url'])))
|
&& validateUrl($idna_convert->encode($_POST['url'])))
|
||||||
{
|
{
|
||||||
$path = $_POST['url'];
|
$path = $_POST['url'];
|
||||||
$_doredirect = true;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -251,14 +249,6 @@ elseif($page == 'domains')
|
|||||||
{
|
{
|
||||||
$path = $userinfo['documentroot'] . '/' . $path;
|
$path = $userinfo['documentroot'] . '/' . $path;
|
||||||
$path = makeCorrectDir($path);
|
$path = makeCorrectDir($path);
|
||||||
if (strstr($path, ":") !== FALSE)
|
|
||||||
{
|
|
||||||
standard_error('pathmaynotcontaincolon');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$_doredirect = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_POST['openbasedir_path'])
|
if(isset($_POST['openbasedir_path'])
|
||||||
@@ -336,13 +326,6 @@ elseif($page == 'domains')
|
|||||||
`ssl_redirect` = '" . $ssl_redirect . "',
|
`ssl_redirect` = '" . $ssl_redirect . "',
|
||||||
`phpsettingid` = '" . $phpsid_result['phpsettingid'] . "'");
|
`phpsettingid` = '" . $phpsid_result['phpsettingid'] . "'");
|
||||||
|
|
||||||
if($_doredirect)
|
|
||||||
{
|
|
||||||
$did = $db->insert_id();
|
|
||||||
$redirect = isset($_POST['redirectcode']) ? (int)$_POST['redirectcode'] : $settings['customredirect']['default'];
|
|
||||||
addRedirectToDomain($did, $redirect);
|
|
||||||
}
|
|
||||||
|
|
||||||
$result = $db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `subdomains_used`=`subdomains_used`+1 WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
|
$result = $db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `subdomains_used`=`subdomains_used`+1 WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
|
||||||
$log->logAction(USR_ACTION, LOG_INFO, "added subdomain '" . $completedomain . "'");
|
$log->logAction(USR_ACTION, LOG_INFO, "added subdomain '" . $completedomain . "'");
|
||||||
inserttask('1');
|
inserttask('1');
|
||||||
@@ -368,26 +351,9 @@ elseif($page == 'domains')
|
|||||||
$aliasdomains.= makeoption($idna_convert->decode($row_domain['domain']), $row_domain['id']);
|
$aliasdomains.= makeoption($idna_convert->decode($row_domain['domain']), $row_domain['id']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$redirectcode = '';
|
$ssl_redirect = makeyesno('ssl_redirect', '1', '0', $result['ssl_redirect']);
|
||||||
if($settings['customredirect']['enabled'] == '1')
|
|
||||||
{
|
|
||||||
$codes = getRedirectCodesArray();
|
|
||||||
foreach($codes as $rc)
|
|
||||||
{
|
|
||||||
$redirectcode .= makeoption($rc['code']. ' ('.$lng['redirect_desc'][$rc['desc']].')', $rc['id'], $settings['customredirect']['default']);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#$ssl_redirect = makeyesno('ssl_redirect', '1', '0', $result['ssl_redirect']);
|
|
||||||
$openbasedir = makeoption($lng['domain']['docroot'], 0, NULL, true) . makeoption($lng['domain']['homedir'], 1, NULL, true);
|
$openbasedir = makeoption($lng['domain']['docroot'], 0, NULL, true) . makeoption($lng['domain']['homedir'], 1, NULL, true);
|
||||||
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit']);
|
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit']);
|
||||||
|
|
||||||
$subdomain_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/domains/formfield.domains_add.php';
|
|
||||||
$subdomain_add_form = htmlform::genHTMLForm($subdomain_add_data);
|
|
||||||
|
|
||||||
$title = $subdomain_add_data['domain_add']['title'];
|
|
||||||
$image = $subdomain_add_data['domain_add']['image'];
|
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("domains/domains_add") . "\";");
|
eval("echo \"" . getTemplate("domains/domains_add") . "\";");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -398,7 +364,6 @@ elseif($page == 'domains')
|
|||||||
$result = $db->query_first("SELECT `d`.`id`, `d`.`customerid`, `d`.`domain`, `d`.`documentroot`, `d`.`isemaildomain`, `d`.`iswildcarddomain`, `d`.`parentdomainid`, `d`.`ssl_redirect`, `d`.`aliasdomain`, `d`.`openbasedir_path`, `d`.`ipandport`, `pd`.`subcanemaildomain` FROM `" . TABLE_PANEL_DOMAINS . "` `d`, `" . TABLE_PANEL_DOMAINS . "` `pd` WHERE `d`.`customerid`='" . (int)$userinfo['customerid'] . "' AND `d`.`id`='" . (int)$id . "' AND ((`d`.`parentdomainid`!='0' AND `pd`.`id`=`d`.`parentdomainid`) OR (`d`.`parentdomainid`='0' AND `pd`.`id`=`d`.`id`)) AND `d`.`caneditdomain`='1'");
|
$result = $db->query_first("SELECT `d`.`id`, `d`.`customerid`, `d`.`domain`, `d`.`documentroot`, `d`.`isemaildomain`, `d`.`iswildcarddomain`, `d`.`parentdomainid`, `d`.`ssl_redirect`, `d`.`aliasdomain`, `d`.`openbasedir_path`, `d`.`ipandport`, `pd`.`subcanemaildomain` FROM `" . TABLE_PANEL_DOMAINS . "` `d`, `" . TABLE_PANEL_DOMAINS . "` `pd` WHERE `d`.`customerid`='" . (int)$userinfo['customerid'] . "' AND `d`.`id`='" . (int)$id . "' AND ((`d`.`parentdomainid`!='0' AND `pd`.`id`=`d`.`parentdomainid`) OR (`d`.`parentdomainid`='0' AND `pd`.`id`=`d`.`id`)) AND `d`.`caneditdomain`='1'");
|
||||||
$alias_check = $db->query_first('SELECT COUNT(`id`) AS count FROM `' . TABLE_PANEL_DOMAINS . '` WHERE `aliasdomain`=\'' . (int)$result['id'] . '\'');
|
$alias_check = $db->query_first('SELECT COUNT(`id`) AS count FROM `' . TABLE_PANEL_DOMAINS . '` WHERE `aliasdomain`=\'' . (int)$result['id'] . '\'');
|
||||||
$alias_check = $alias_check['count'];
|
$alias_check = $alias_check['count'];
|
||||||
$_doredirect = false;
|
|
||||||
|
|
||||||
if(isset($result['customerid'])
|
if(isset($result['customerid'])
|
||||||
&& $result['customerid'] == $userinfo['customerid'])
|
&& $result['customerid'] == $userinfo['customerid'])
|
||||||
@@ -411,7 +376,6 @@ elseif($page == 'domains')
|
|||||||
&& validateUrl($idna_convert->encode($_POST['url'])))
|
&& validateUrl($idna_convert->encode($_POST['url'])))
|
||||||
{
|
{
|
||||||
$path = $_POST['url'];
|
$path = $_POST['url'];
|
||||||
$_doredirect = true;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -423,14 +387,6 @@ elseif($page == 'domains')
|
|||||||
{
|
{
|
||||||
$path = $userinfo['documentroot'] . '/' . $path;
|
$path = $userinfo['documentroot'] . '/' . $path;
|
||||||
$path = makeCorrectDir($path);
|
$path = makeCorrectDir($path);
|
||||||
if (strstr($path, ":") !== FALSE)
|
|
||||||
{
|
|
||||||
standard_error('pathmaynotcontaincolon');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$_doredirect = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$aliasdomain = intval($_POST['alias']);
|
$aliasdomain = intval($_POST['alias']);
|
||||||
@@ -505,12 +461,6 @@ elseif($page == 'domains')
|
|||||||
$log->logAction(USR_ACTION, LOG_NOTICE, "automatically deleted mail-table entries for '" . $idna_convert->decode($result['domain']) . "'");
|
$log->logAction(USR_ACTION, LOG_NOTICE, "automatically deleted mail-table entries for '" . $idna_convert->decode($result['domain']) . "'");
|
||||||
}
|
}
|
||||||
|
|
||||||
if($_doredirect)
|
|
||||||
{
|
|
||||||
$redirect = isset($_POST['redirectcode']) ? (int)$_POST['redirectcode'] : false;
|
|
||||||
updateRedirectOfDomain($id, $redirect);
|
|
||||||
}
|
|
||||||
|
|
||||||
if($path != $result['documentroot']
|
if($path != $result['documentroot']
|
||||||
|| $isemaildomain != $result['isemaildomain']
|
|| $isemaildomain != $result['isemaildomain']
|
||||||
|| $iswildcarddomain != $result['iswildcarddomain']
|
|| $iswildcarddomain != $result['iswildcarddomain']
|
||||||
@@ -541,17 +491,10 @@ elseif($page == 'domains')
|
|||||||
|
|
||||||
if(preg_match('/^https?\:\/\//', $result['documentroot'])
|
if(preg_match('/^https?\:\/\//', $result['documentroot'])
|
||||||
&& validateUrl($idna_convert->encode($result['documentroot']))
|
&& validateUrl($idna_convert->encode($result['documentroot']))
|
||||||
) {
|
&& $settings['panel']['pathedit'] == 'Dropdown')
|
||||||
if($settings['panel']['pathedit'] == 'Dropdown')
|
{
|
||||||
{
|
$urlvalue = $result['documentroot'];
|
||||||
$urlvalue = $result['documentroot'];
|
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit']);
|
||||||
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit']);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$urlvalue = '';
|
|
||||||
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit'], $result['documentroot'], true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -559,20 +502,9 @@ elseif($page == 'domains')
|
|||||||
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit'], $result['documentroot']);
|
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit'], $result['documentroot']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$redirectcode = '';
|
$ssl_redirect = makeyesno('ssl_redirect', '1', '0', $result['ssl_redirect']);
|
||||||
if($settings['customredirect']['enabled'] == '1')
|
$iswildcarddomain = makeyesno('iswildcarddomain', '1', '0', $result['iswildcarddomain']);
|
||||||
{
|
$isemaildomain = makeyesno('isemaildomain', '1', '0', $result['isemaildomain']);
|
||||||
$def_code = getDomainRedirectId($id);
|
|
||||||
$codes = getRedirectCodesArray();
|
|
||||||
foreach($codes as $rc)
|
|
||||||
{
|
|
||||||
$redirectcode .= makeoption($rc['code']. ' ('.$lng['redirect_desc'][$rc['desc']].')', $rc['id'], $def_code);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#$ssl_redirect = makeyesno('ssl_redirect', '1', '0', $result['ssl_redirect']);
|
|
||||||
#$iswildcarddomain = makeyesno('iswildcarddomain', '1', '0', $result['iswildcarddomain']);
|
|
||||||
#$isemaildomain = makeyesno('isemaildomain', '1', '0', $result['isemaildomain']);
|
|
||||||
$openbasedir = makeoption($lng['domain']['docroot'], 0, $result['openbasedir_path'], true) . makeoption($lng['domain']['homedir'], 1, $result['openbasedir_path'], true);
|
$openbasedir = makeoption($lng['domain']['docroot'], 0, $result['openbasedir_path'], true) . makeoption($lng['domain']['homedir'], 1, $result['openbasedir_path'], true);
|
||||||
|
|
||||||
$result_ipandport = $db->query_first("SELECT `ip` FROM `".TABLE_PANEL_IPSANDPORTS."` WHERE `id`='".(int)$result['ipandport']."'");
|
$result_ipandport = $db->query_first("SELECT `ip` FROM `".TABLE_PANEL_IPSANDPORTS."` WHERE `id`='".(int)$result['ipandport']."'");
|
||||||
@@ -583,12 +515,6 @@ elseif($page == 'domains')
|
|||||||
$domainip = $result_ipandport['ip'];
|
$domainip = $result_ipandport['ip'];
|
||||||
$result = htmlentities_array($result);
|
$result = htmlentities_array($result);
|
||||||
|
|
||||||
$subdomain_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/domains/formfield.domains_edit.php';
|
|
||||||
$subdomain_edit_form = htmlform::genHTMLForm($subdomain_edit_data);
|
|
||||||
|
|
||||||
$title = $subdomain_edit_data['domain_edit']['title'];
|
|
||||||
$image = $subdomain_edit_data['domain_edit']['image'];
|
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("domains/domains_edit") . "\";");
|
eval("echo \"" . getTemplate("domains/domains_edit") . "\";");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -139,10 +139,8 @@ elseif($page == 'emails')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$emaildomains_count = $db->query_first("SELECT COUNT(`id`) AS `count` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `isemaildomain`='1' ORDER BY `domain` ASC");
|
$emaildomains_count = $db->query_first("SELECT COUNT(`id`) AS `count` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid`='" . $userinfo['customerid'] . "' AND `isemaildomain`='1' ORDER BY `domain` ASC");
|
||||||
$emaildomains_count = $emaildomains_count['count'];
|
$emaildomains_count = $emaildomains_count['count'];
|
||||||
|
|
||||||
$emailscount = $db->num_rows($result);
|
|
||||||
eval("echo \"" . getTemplate("email/emails") . "\";");
|
eval("echo \"" . getTemplate("email/emails") . "\";");
|
||||||
}
|
}
|
||||||
elseif($action == 'delete'
|
elseif($action == 'delete'
|
||||||
@@ -184,12 +182,6 @@ elseif($page == 'emails')
|
|||||||
$number_forwarders = 0;
|
$number_forwarders = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_POST['delete_userfiles'])
|
|
||||||
&& (int)$_POST['delete_userfiles'] == 1)
|
|
||||||
{
|
|
||||||
inserttask('7', $userinfo['loginname'], $result['email_full']);
|
|
||||||
}
|
|
||||||
|
|
||||||
$db->query("DELETE FROM `" . TABLE_MAIL_VIRTUAL . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
$db->query("DELETE FROM `" . TABLE_MAIL_VIRTUAL . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
||||||
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `emails_used`=`emails_used` - 1 , `email_forwarders_used` = `email_forwarders_used` - " . (int)$number_forwarders . " $update_users_query_addon WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
|
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `emails_used`=`emails_used` - 1 , `email_forwarders_used` = `email_forwarders_used` - " . (int)$number_forwarders . " $update_users_query_addon WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
|
||||||
$log->logAction(USR_ACTION, LOG_INFO, "deleted email address '" . $result['email'] . "'");
|
$log->logAction(USR_ACTION, LOG_INFO, "deleted email address '" . $result['email'] . "'");
|
||||||
@@ -197,12 +189,7 @@ elseif($page == 'emails')
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(maildirExists($result)) {
|
ask_yesno('email_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $idna_convert->decode($result['email_full']));
|
||||||
$show_checkbox = true;
|
|
||||||
} else {
|
|
||||||
$show_checkbox = false;
|
|
||||||
}
|
|
||||||
ask_yesno_withcheckbox('email_reallydelete', 'admin_customer_alsoremovemail', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $idna_convert->decode($result['email_full']), $show_checkbox);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -281,14 +268,7 @@ elseif($page == 'emails')
|
|||||||
$domains.= makeoption($idna_convert->decode($row['domain']), $row['domain']);
|
$domains.= makeoption($idna_convert->decode($row['domain']), $row['domain']);
|
||||||
}
|
}
|
||||||
|
|
||||||
#$iscatchall = makeyesno('iscatchall', '1', '0', '0');
|
$iscatchall = makeyesno('iscatchall', '1', '0', '0');
|
||||||
|
|
||||||
$email_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/email/formfield.emails_add.php';
|
|
||||||
$email_add_form = htmlform::genHTMLForm($email_add_data);
|
|
||||||
|
|
||||||
$title = $email_add_data['emails_add']['title'];
|
|
||||||
$image = $email_add_data['emails_add']['image'];
|
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("email/emails_add") . "\";");
|
eval("echo \"" . getTemplate("email/emails_add") . "\";");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -328,13 +308,6 @@ elseif($page == 'emails')
|
|||||||
|
|
||||||
$destinations_count = count($result['destination']);
|
$destinations_count = count($result['destination']);
|
||||||
$result = htmlentities_array($result);
|
$result = htmlentities_array($result);
|
||||||
|
|
||||||
$email_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/email/formfield.emails_edit.php';
|
|
||||||
$email_edit_form = htmlform::genHTMLForm($email_edit_data);
|
|
||||||
|
|
||||||
$title = $email_edit_data['emails_edit']['title'];
|
|
||||||
$image = $email_edit_data['emails_edit']['image'];
|
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("email/emails_edit") . "\";");
|
eval("echo \"" . getTemplate("email/emails_edit") . "\";");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -519,13 +492,6 @@ elseif($page == 'accounts')
|
|||||||
$result['email_full'] = $idna_convert->decode($result['email_full']);
|
$result['email_full'] = $idna_convert->decode($result['email_full']);
|
||||||
$result = htmlentities_array($result);
|
$result = htmlentities_array($result);
|
||||||
$quota = $settings['system']['mail_quota'];
|
$quota = $settings['system']['mail_quota'];
|
||||||
|
|
||||||
$account_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/email/formfield.emails_addaccount.php';
|
|
||||||
$account_add_form = htmlform::genHTMLForm($account_add_data);
|
|
||||||
|
|
||||||
$title = $account_add_data['emails_addaccount']['title'];
|
|
||||||
$image = $account_add_data['emails_addaccount']['image'];
|
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("email/account_add") . "\";");
|
eval("echo \"" . getTemplate("email/account_add") . "\";");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -564,13 +530,6 @@ elseif($page == 'accounts')
|
|||||||
{
|
{
|
||||||
$result['email_full'] = $idna_convert->decode($result['email_full']);
|
$result['email_full'] = $idna_convert->decode($result['email_full']);
|
||||||
$result = htmlentities_array($result);
|
$result = htmlentities_array($result);
|
||||||
|
|
||||||
$account_changepw_data = include_once dirname(__FILE__).'/lib/formfields/customer/email/formfield.emails_accountchangepasswd.php';
|
|
||||||
$account_changepw_form = htmlform::genHTMLForm($account_changepw_data);
|
|
||||||
|
|
||||||
$title = $account_changepw_data['emails_accountchangepasswd']['title'];
|
|
||||||
$image = $account_changepw_data['emails_accountchangepasswd']['image'];
|
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("email/account_changepw") . "\";");
|
eval("echo \"" . getTemplate("email/account_changepw") . "\";");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -612,13 +571,6 @@ elseif($page == 'accounts')
|
|||||||
{
|
{
|
||||||
$result['email_full'] = $idna_convert->decode($result['email_full']);
|
$result['email_full'] = $idna_convert->decode($result['email_full']);
|
||||||
$result = htmlentities_array($result);
|
$result = htmlentities_array($result);
|
||||||
|
|
||||||
$quota_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/email/formfield.emails_accountchangequota.php';
|
|
||||||
$quota_edit_form = htmlform::genHTMLForm($quota_edit_data);
|
|
||||||
|
|
||||||
$title = $quota_edit_data['emails_accountchangequota']['title'];
|
|
||||||
$image = $quota_edit_data['emails_accountchangequota']['image'];
|
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("email/account_changequota") . "\";");
|
eval("echo \"" . getTemplate("email/account_changequota") . "\";");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -648,19 +600,13 @@ elseif($page == 'accounts')
|
|||||||
$quota = 0;
|
$quota = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_POST['delete_userfiles'])
|
|
||||||
&& (int)$_POST['delete_userfiles'] == 1)
|
|
||||||
{
|
|
||||||
inserttask('7', $userinfo['loginname'], $result['email_full']);
|
|
||||||
}
|
|
||||||
|
|
||||||
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `email_accounts_used` = `email_accounts_used` - 1, `email_quota_used` = `email_quota_used` - " . (int)$quota . " WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
|
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `email_accounts_used` = `email_accounts_used` - 1, `email_quota_used` = `email_quota_used` - " . (int)$quota . " WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
|
||||||
$log->logAction(USR_ACTION, LOG_INFO, "deleted email account for '" . $result['email_full'] . "'");
|
$log->logAction(USR_ACTION, LOG_INFO, "deleted email account for '" . $result['email_full'] . "'");
|
||||||
redirectTo($filename, Array('page' => 'emails', 'action' => 'edit', 'id' => $id, 's' => $s));
|
redirectTo($filename, Array('page' => 'emails', 'action' => 'edit', 'id' => $id, 's' => $s));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ask_yesno_withcheckbox('email_reallydelete_account', 'admin_customer_alsoremovemail', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $idna_convert->decode($result['email_full']));
|
ask_yesno('email_reallydelete_account', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $idna_convert->decode($result['email_full']));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -713,13 +659,6 @@ elseif($page == 'forwarders')
|
|||||||
{
|
{
|
||||||
$result['email_full'] = $idna_convert->decode($result['email_full']);
|
$result['email_full'] = $idna_convert->decode($result['email_full']);
|
||||||
$result = htmlentities_array($result);
|
$result = htmlentities_array($result);
|
||||||
|
|
||||||
$forwarder_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/email/formfield.emails_addforwarder.php';
|
|
||||||
$forwarder_add_form = htmlform::genHTMLForm($forwarder_add_data);
|
|
||||||
|
|
||||||
$title = $forwarder_add_data['emails_addforwarder']['title'];
|
|
||||||
$image = $forwarder_add_data['emails_addforwarder']['image'];
|
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("email/forwarder_add") . "\";");
|
eval("echo \"" . getTemplate("email/forwarder_add") . "\";");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,31 +39,6 @@ if($page == 'overview')
|
|||||||
$log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_extras");
|
$log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_extras");
|
||||||
eval("echo \"" . getTemplate("extras/extras") . "\";");
|
eval("echo \"" . getTemplate("extras/extras") . "\";");
|
||||||
}
|
}
|
||||||
elseif($page == 'backup')
|
|
||||||
{
|
|
||||||
$log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_extras_backup");
|
|
||||||
|
|
||||||
$result = $db->query("SELECT `backup_enabled` FROM `" . TABLE_PANEL_CUSTOMERS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
|
|
||||||
$row = $db->fetch_array($result);
|
|
||||||
|
|
||||||
$backup_enabled = makeyesno('backup_enabled', '1', '0', $row['backup_enabled']);
|
|
||||||
|
|
||||||
if(isset($_POST['send']) && $_POST['send'] == 'send'){
|
|
||||||
$backup_enabled = ($_POST['backup_enabled'] == '1' ? '1' : '0');
|
|
||||||
$backup_ftp_enabled = ($_POST['backup_ftp_enabled'] == '1' ? '1' : '0');
|
|
||||||
|
|
||||||
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `backup_enabled`='" . $backup_enabled . "' WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
|
|
||||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
|
||||||
}
|
|
||||||
|
|
||||||
$backup_data = include_once dirname(__FILE__).'/lib/formfields/customer/extras/formfield.backup.php';
|
|
||||||
$backup_form = htmlform::genHTMLForm($backup_data);
|
|
||||||
|
|
||||||
$title = $backup_data['backup']['title'];
|
|
||||||
$image = $backup_data['backup']['image'];
|
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("extras/backup") . "\";");
|
|
||||||
}
|
|
||||||
elseif($page == 'htpasswds')
|
elseif($page == 'htpasswds')
|
||||||
{
|
{
|
||||||
if($action == '')
|
if($action == '')
|
||||||
@@ -74,7 +49,7 @@ elseif($page == 'htpasswds')
|
|||||||
'path' => $lng['panel']['path']
|
'path' => $lng['panel']['path']
|
||||||
);
|
);
|
||||||
$paging = new paging($userinfo, $db, TABLE_PANEL_HTPASSWDS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
|
$paging = new paging($userinfo, $db, TABLE_PANEL_HTPASSWDS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
|
||||||
$result = $db->query("SELECT * FROM `" . TABLE_PANEL_HTPASSWDS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
|
$result = $db->query("SELECT `id`, `username`, `path` FROM `" . TABLE_PANEL_HTPASSWDS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
|
||||||
$paging->setEntries($db->num_rows($result));
|
$paging->setEntries($db->num_rows($result));
|
||||||
$sortcode = $paging->getHtmlSortCode($lng);
|
$sortcode = $paging->getHtmlSortCode($lng);
|
||||||
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
|
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
|
||||||
@@ -106,7 +81,7 @@ elseif($page == 'htpasswds')
|
|||||||
elseif($action == 'delete'
|
elseif($action == 'delete'
|
||||||
&& $id != 0)
|
&& $id != 0)
|
||||||
{
|
{
|
||||||
$result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_HTPASSWDS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
$result = $db->query_first("SELECT `id`, `customerid`, `username`, `path` FROM `" . TABLE_PANEL_HTPASSWDS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
||||||
|
|
||||||
if(isset($result['username'])
|
if(isset($result['username'])
|
||||||
&& $result['username'] != '')
|
&& $result['username'] != '')
|
||||||
@@ -139,7 +114,6 @@ elseif($page == 'htpasswds')
|
|||||||
$userpath = $path;
|
$userpath = $path;
|
||||||
$path = makeCorrectDir($userinfo['documentroot'] . '/' . $path);
|
$path = makeCorrectDir($userinfo['documentroot'] . '/' . $path);
|
||||||
$username = validate($_POST['username'], 'username', '/^[a-zA-Z0-9][a-zA-Z0-9\-_]+\$?$/');
|
$username = validate($_POST['username'], 'username', '/^[a-zA-Z0-9][a-zA-Z0-9\-_]+\$?$/');
|
||||||
$authname = validate($_POST['directory_authname'], 'directory_authname', '/^[a-zA-Z0-9][a-zA-Z0-9\-_ ]+\$?$/');
|
|
||||||
validate($_POST['directory_password'], 'password');
|
validate($_POST['directory_password'], 'password');
|
||||||
$username_path_check = $db->query_first("SELECT `id`, `username`, `path` FROM `" . TABLE_PANEL_HTPASSWDS . "` WHERE `username`='" . $db->escape($username) . "' AND `path`='" . $db->escape($path) . "' AND `customerid`='" . (int)$userinfo['customerid'] . "'");
|
$username_path_check = $db->query_first("SELECT `id`, `username`, `path` FROM `" . TABLE_PANEL_HTPASSWDS . "` WHERE `username`='" . $db->escape($username) . "' AND `path`='" . $db->escape($path) . "' AND `customerid`='" . (int)$userinfo['customerid'] . "'");
|
||||||
|
|
||||||
@@ -177,7 +151,7 @@ elseif($page == 'htpasswds')
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$db->query("INSERT INTO `" . TABLE_PANEL_HTPASSWDS . "` (`customerid`, `username`, `password`, `path`, `authname`) VALUES ('" . (int)$userinfo['customerid'] . "', '" . $db->escape($username) . "', '" . $db->escape($password) . "', '" . $db->escape($path) . "', '" . $db->escape($authname) . "')");
|
$db->query("INSERT INTO `" . TABLE_PANEL_HTPASSWDS . "` (`customerid`, `username`, `password`, `path`) VALUES ('" . (int)$userinfo['customerid'] . "', '" . $db->escape($username) . "', '" . $db->escape($password) . "', '" . $db->escape($path) . "')");
|
||||||
$log->logAction(USR_ACTION, LOG_INFO, "added htpasswd for '" . $username . " (" . $path . ")'");
|
$log->logAction(USR_ACTION, LOG_INFO, "added htpasswd for '" . $username . " (" . $path . ")'");
|
||||||
inserttask('1');
|
inserttask('1');
|
||||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||||
@@ -186,20 +160,13 @@ elseif($page == 'htpasswds')
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit']);
|
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit']);
|
||||||
|
|
||||||
$htpasswd_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/extras/formfield.htpasswd_add.php';
|
|
||||||
$htpasswd_add_form = htmlform::genHTMLForm($htpasswd_add_data);
|
|
||||||
|
|
||||||
$title = $htpasswd_add_data['htpasswd_add']['title'];
|
|
||||||
$image = $htpasswd_add_data['htpasswd_add']['image'];
|
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("extras/htpasswds_add") . "\";");
|
eval("echo \"" . getTemplate("extras/htpasswds_add") . "\";");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elseif($action == 'edit'
|
elseif($action == 'edit'
|
||||||
&& $id != 0)
|
&& $id != 0)
|
||||||
{
|
{
|
||||||
$result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_HTPASSWDS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
$result = $db->query_first("SELECT `id`, `username`, `path` FROM `" . TABLE_PANEL_HTPASSWDS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
||||||
|
|
||||||
if(isset($result['username'])
|
if(isset($result['username'])
|
||||||
&& $result['username'] != '')
|
&& $result['username'] != '')
|
||||||
@@ -208,7 +175,6 @@ elseif($page == 'htpasswds')
|
|||||||
&& $_POST['send'] == 'send')
|
&& $_POST['send'] == 'send')
|
||||||
{
|
{
|
||||||
validate($_POST['directory_password'], 'password');
|
validate($_POST['directory_password'], 'password');
|
||||||
$authname = validate($_POST['directory_authname'], 'directory_authname', '/^[a-zA-Z0-9][a-zA-Z0-9\-_ ]+\$?$/');
|
|
||||||
|
|
||||||
if(CRYPT_STD_DES == 1)
|
if(CRYPT_STD_DES == 1)
|
||||||
{
|
{
|
||||||
@@ -220,25 +186,13 @@ elseif($page == 'htpasswds')
|
|||||||
$password = crypt($_POST['directory_password']);
|
$password = crypt($_POST['directory_password']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$pwd_sql = '';
|
if($_POST['directory_password'] == '')
|
||||||
if($_POST['directory_password'] != '')
|
|
||||||
{
|
{
|
||||||
$pwd_sql = "`password`='" . $db->escape($password) . "' ";
|
standard_error(array('stringisempty', 'mypassword'));
|
||||||
}
|
}
|
||||||
|
else
|
||||||
$auth_sql = '';
|
|
||||||
if($authname != $result['authname'])
|
|
||||||
{
|
{
|
||||||
$auth_sql = "`authname`='" . $db->escape($authname) . "' ";
|
$db->query("UPDATE `" . TABLE_PANEL_HTPASSWDS . "` SET `password`='" . $db->escape($password) . "' WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
||||||
}
|
|
||||||
|
|
||||||
if($pwd_sql != '' || $auth_sql != '')
|
|
||||||
{
|
|
||||||
if($pwd_sql !='' && $auth_sql != '') {
|
|
||||||
$pwd_sql.= ', ';
|
|
||||||
}
|
|
||||||
|
|
||||||
$db->query("UPDATE `" . TABLE_PANEL_HTPASSWDS . "` SET ".$pwd_sql.$auth_sql." WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
|
||||||
$log->logAction(USR_ACTION, LOG_INFO, "edited htpasswd for '" . $result['username'] . " (" . $result['path'] . ")'");
|
$log->logAction(USR_ACTION, LOG_INFO, "edited htpasswd for '" . $result['username'] . " (" . $result['path'] . ")'");
|
||||||
inserttask('1');
|
inserttask('1');
|
||||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||||
@@ -252,13 +206,6 @@ elseif($page == 'htpasswds')
|
|||||||
}
|
}
|
||||||
|
|
||||||
$result = htmlentities_array($result);
|
$result = htmlentities_array($result);
|
||||||
|
|
||||||
$htpasswd_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/extras/formfield.htpasswd_edit.php';
|
|
||||||
$htpasswd_edit_form = htmlform::genHTMLForm($htpasswd_edit_data);
|
|
||||||
|
|
||||||
$title = $htpasswd_edit_data['htpasswd_edit']['title'];
|
|
||||||
$image = $htpasswd_edit_data['htpasswd_edit']['image'];
|
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("extras/htpasswds_edit") . "\";");
|
eval("echo \"" . getTemplate("extras/htpasswds_edit") . "\";");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -274,11 +221,10 @@ elseif($page == 'htaccess')
|
|||||||
'options_indexes' => $lng['extras']['view_directory'],
|
'options_indexes' => $lng['extras']['view_directory'],
|
||||||
'error404path' => $lng['extras']['error404path'],
|
'error404path' => $lng['extras']['error404path'],
|
||||||
'error403path' => $lng['extras']['error403path'],
|
'error403path' => $lng['extras']['error403path'],
|
||||||
'error500path' => $lng['extras']['error500path'],
|
'error500path' => $lng['extras']['error500path']
|
||||||
'options_cgi' => $lng['extras']['execute_perl']
|
|
||||||
);
|
);
|
||||||
$paging = new paging($userinfo, $db, TABLE_PANEL_HTACCESS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
|
$paging = new paging($userinfo, $db, TABLE_PANEL_HTACCESS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
|
||||||
$result = $db->query("SELECT * FROM `" . TABLE_PANEL_HTACCESS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
|
$result = $db->query("SELECT `id`, `path`, `options_indexes`, `error404path`, `error403path`, `error500path` FROM `" . TABLE_PANEL_HTACCESS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
|
||||||
$paging->setEntries($db->num_rows($result));
|
$paging->setEntries($db->num_rows($result));
|
||||||
$sortcode = $paging->getHtmlSortCode($lng);
|
$sortcode = $paging->getHtmlSortCode($lng);
|
||||||
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
|
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
|
||||||
@@ -288,8 +234,6 @@ elseif($page == 'htaccess')
|
|||||||
$count = 0;
|
$count = 0;
|
||||||
$htaccess = '';
|
$htaccess = '';
|
||||||
|
|
||||||
$cperlenabled = customerHasPerlEnabled($userinfo['customerid']);
|
|
||||||
|
|
||||||
while($row = $db->fetch_array($result))
|
while($row = $db->fetch_array($result))
|
||||||
{
|
{
|
||||||
if($paging->checkDisplay($i))
|
if($paging->checkDisplay($i))
|
||||||
@@ -297,14 +241,10 @@ elseif($page == 'htaccess')
|
|||||||
if(strpos($row['path'], $userinfo['documentroot']) === 0)
|
if(strpos($row['path'], $userinfo['documentroot']) === 0)
|
||||||
{
|
{
|
||||||
$row['path'] = substr($row['path'], strlen($userinfo['documentroot']));
|
$row['path'] = substr($row['path'], strlen($userinfo['documentroot']));
|
||||||
// don't show nothing wehn it's the docroot, show slash
|
|
||||||
if ($row['path'] == '') { $row['path'] = '/'; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$row['options_indexes'] = str_replace('1', $lng['panel']['yes'], $row['options_indexes']);
|
$row['options_indexes'] = str_replace('1', $lng['panel']['yes'], $row['options_indexes']);
|
||||||
$row['options_indexes'] = str_replace('0', $lng['panel']['no'], $row['options_indexes']);
|
$row['options_indexes'] = str_replace('0', $lng['panel']['no'], $row['options_indexes']);
|
||||||
$row['options_cgi'] = str_replace('1', $lng['panel']['yes'], $row['options_cgi']);
|
|
||||||
$row['options_cgi'] = str_replace('0', $lng['panel']['no'], $row['options_cgi']);
|
|
||||||
$row = htmlentities_array($row);
|
$row = htmlentities_array($row);
|
||||||
eval("\$htaccess.=\"" . getTemplate("extras/htaccess_htaccess") . "\";");
|
eval("\$htaccess.=\"" . getTemplate("extras/htaccess_htaccess") . "\";");
|
||||||
$count++;
|
$count++;
|
||||||
@@ -353,18 +293,35 @@ elseif($page == 'htaccess')
|
|||||||
standard_error('invalidpath');
|
standard_error('invalidpath');
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_POST['options_cgi']))
|
if(($_POST['error404path'] === '')
|
||||||
|
|| (validateUrl($idna_convert->encode($_POST['error404path']))))
|
||||||
{
|
{
|
||||||
$options_cgi = intval($_POST['options_cgi']);
|
$error404path = $_POST['error404path'];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$options_cgi = '0';
|
standard_error('mustbeurl');
|
||||||
}
|
}
|
||||||
|
|
||||||
$error404path = correctErrorDocument($_POST['error404path']);
|
if(($_POST['error403path'] === '')
|
||||||
$error403path = correctErrorDocument($_POST['error403path']);
|
|| (validateUrl($idna_convert->encode($_POST['error403path']))))
|
||||||
$error500path = correctErrorDocument($_POST['error500path']);
|
{
|
||||||
|
$error403path = $_POST['error403path'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
standard_error('mustbeurl');
|
||||||
|
}
|
||||||
|
|
||||||
|
if(($_POST['error500path'] === '')
|
||||||
|
|| (validateUrl($idna_convert->encode($_POST['error500path']))))
|
||||||
|
{
|
||||||
|
$error500path = $_POST['error500path'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
standard_error('mustbeurl');
|
||||||
|
}
|
||||||
|
|
||||||
if($path_dupe_check['path'] == $path)
|
if($path_dupe_check['path'] == $path)
|
||||||
{
|
{
|
||||||
@@ -376,15 +333,7 @@ elseif($page == 'htaccess')
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$db->query('INSERT INTO `' . TABLE_PANEL_HTACCESS . '` SET
|
$db->query('INSERT INTO `' . TABLE_PANEL_HTACCESS . '` (`customerid`, `path`, `options_indexes`, `error404path`, `error403path`, `error500path` ) VALUES ("' . (int)$userinfo['customerid'] . '", "' . $db->escape($path) . '", "' . $db->escape($_POST['options_indexes'] == '1' ? '1' : '0') . '", "' . $db->escape($error404path) . '", "' . $db->escape($error403path) . '", "' . $db->escape($error500path) . '" )');
|
||||||
`customerid` = "'.(int)$userinfo['customerid'].'",
|
|
||||||
`path` = "'.$db->escape($path).'",
|
|
||||||
`options_indexes` = "'.$db->escape($_POST['options_indexes'] == '1' ? '1' : '0').'",
|
|
||||||
`error404path` = "'.$db->escape($error404path).'",
|
|
||||||
`error403path` = "'.$db->escape($error403path).'",
|
|
||||||
`error500path` = "'.$db->escape($error500path).'",
|
|
||||||
`options_cgi` = "'.$db->escape($options_cgi).'"');
|
|
||||||
|
|
||||||
$log->logAction(USR_ACTION, LOG_INFO, "added htaccess for '" . $path . "'");
|
$log->logAction(USR_ACTION, LOG_INFO, "added htaccess for '" . $path . "'");
|
||||||
inserttask('1');
|
inserttask('1');
|
||||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||||
@@ -393,16 +342,7 @@ elseif($page == 'htaccess')
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit']);
|
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit']);
|
||||||
#$options_indexes = makeyesno('options_indexes', '1', '0', '0');
|
$options_indexes = makeyesno('options_indexes', '1', '0', '1');
|
||||||
$cperlenabled = customerHasPerlEnabled($userinfo['customerid']);
|
|
||||||
#$options_cgi = makeyesno('options_cgi', '1', '0', '0');
|
|
||||||
|
|
||||||
$htaccess_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/extras/formfield.htaccess_add.php';
|
|
||||||
$htaccess_add_form = htmlform::genHTMLForm($htaccess_add_data);
|
|
||||||
|
|
||||||
$title = $htaccess_add_data['htaccess_add']['title'];
|
|
||||||
$image = $htaccess_add_data['htaccess_add']['image'];
|
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("extras/htaccess_add") . "\";");
|
eval("echo \"" . getTemplate("extras/htaccess_add") . "\";");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -419,30 +359,49 @@ elseif($page == 'htaccess')
|
|||||||
&& $_POST['send'] == 'send')
|
&& $_POST['send'] == 'send')
|
||||||
{
|
{
|
||||||
$option_indexes = intval($_POST['options_indexes']);
|
$option_indexes = intval($_POST['options_indexes']);
|
||||||
$options_cgi = isset($_POST['options_cgi']) ? intval($_POST['options_cgi']) : 0;
|
|
||||||
|
|
||||||
if($option_indexes != '1')
|
if($option_indexes != '1')
|
||||||
{
|
{
|
||||||
$option_indexes = '0';
|
$option_indexes = '0';
|
||||||
}
|
}
|
||||||
|
|
||||||
if($options_cgi != '1')
|
if(($_POST['error404path'] === '')
|
||||||
|
|| (validateUrl($idna_convert->encode($_POST['error404path']))))
|
||||||
{
|
{
|
||||||
$options_cgi = '0';
|
$error404path = $_POST['error404path'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
standard_error('mustbeurl');
|
||||||
}
|
}
|
||||||
|
|
||||||
$error404path = correctErrorDocument($_POST['error404path']);
|
if(($_POST['error403path'] === '')
|
||||||
$error403path = correctErrorDocument($_POST['error403path']);
|
|| (validateUrl($idna_convert->encode($_POST['error403path']))))
|
||||||
$error500path = correctErrorDocument($_POST['error500path']);
|
{
|
||||||
|
$error403path = $_POST['error403path'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
standard_error('mustbeurl');
|
||||||
|
}
|
||||||
|
|
||||||
|
if(($_POST['error500path'] === '')
|
||||||
|
|| (validateUrl($idna_convert->encode($_POST['error500path']))))
|
||||||
|
{
|
||||||
|
$error500path = $_POST['error500path'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
standard_error('mustbeurl');
|
||||||
|
}
|
||||||
|
|
||||||
if(($option_indexes != $result['options_indexes'])
|
if(($option_indexes != $result['options_indexes'])
|
||||||
|| ($error404path != $result['error404path'])
|
|| ($error404path != $result['error404path'])
|
||||||
|| ($error403path != $result['error403path'])
|
|| ($error403path != $result['error403path'])
|
||||||
|| ($error500path != $result['error500path'])
|
|| ($error500path != $result['error500path']))
|
||||||
|| ($options_cgi != $result['options_cgi']))
|
|
||||||
{
|
{
|
||||||
inserttask('1');
|
inserttask('1');
|
||||||
$db->query('UPDATE `' . TABLE_PANEL_HTACCESS . '` SET `options_indexes` = "' . $db->escape($option_indexes) . '", `error404path` = "' . $db->escape($error404path) . '", `error403path` = "' . $db->escape($error403path) . '", `error500path` = "' . $db->escape($error500path) . '", `options_cgi` = "' . $db->escape($options_cgi) . '" WHERE `customerid` = "' . (int)$userinfo['customerid'] . '" AND `id` = "' . (int)$id . '"');
|
$db->query('UPDATE `' . TABLE_PANEL_HTACCESS . '` SET `options_indexes` = "' . $db->escape($option_indexes) . '", `error404path` = "' . $db->escape($error404path) . '", `error403path` = "' . $db->escape($error403path) . '", `error500path` = "' . $db->escape($error500path) . '" WHERE `customerid` = "' . (int)$userinfo['customerid'] . '" AND `id` = "' . (int)$id . '"');
|
||||||
$log->logAction(USR_ACTION, LOG_INFO, "edited htaccess for '" . str_replace($userinfo['documentroot'], '', $result['path']) . "'");
|
$log->logAction(USR_ACTION, LOG_INFO, "edited htaccess for '" . str_replace($userinfo['documentroot'], '', $result['path']) . "'");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -453,24 +412,13 @@ elseif($page == 'htaccess')
|
|||||||
if(strpos($result['path'], $userinfo['documentroot']) === 0)
|
if(strpos($result['path'], $userinfo['documentroot']) === 0)
|
||||||
{
|
{
|
||||||
$result['path'] = substr($result['path'], strlen($userinfo['documentroot']));
|
$result['path'] = substr($result['path'], strlen($userinfo['documentroot']));
|
||||||
// don't show nothing wehn it's the docroot, show slash
|
|
||||||
if ($result['path'] == '') { $result['path'] = '/'; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$result['error404path'] = $result['error404path'];
|
$result['error404path'] = $result['error404path'];
|
||||||
$result['error403path'] = $result['error403path'];
|
$result['error403path'] = $result['error403path'];
|
||||||
$result['error500path'] = $result['error500path'];
|
$result['error500path'] = $result['error500path'];
|
||||||
#$options_indexes = makeyesno('options_indexes', '1', '0', $result['options_indexes']);
|
$options_indexes = makeyesno('options_indexes', '1', '0', $result['options_indexes']);
|
||||||
$cperlenabled = customerHasPerlEnabled($userinfo['customerid']);
|
|
||||||
#$options_cgi = makeyesno('options_cgi', '1', '0', $result['options_cgi']);
|
|
||||||
$result = htmlentities_array($result);
|
$result = htmlentities_array($result);
|
||||||
|
|
||||||
$htaccess_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/extras/formfield.htaccess_edit.php';
|
|
||||||
$htaccess_edit_form = htmlform::genHTMLForm($htaccess_edit_data);
|
|
||||||
|
|
||||||
$title = $htaccess_edit_data['htaccess_edit']['title'];
|
|
||||||
$image = $htaccess_edit_data['htaccess_edit']['image'];
|
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("extras/htaccess_edit") . "\";");
|
eval("echo \"" . getTemplate("extras/htaccess_edit") . "\";");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -97,12 +97,17 @@ elseif($page == 'accounts')
|
|||||||
&& $_POST['send'] == 'send')
|
&& $_POST['send'] == 'send')
|
||||||
{
|
{
|
||||||
$db->query("UPDATE `" . TABLE_FTP_USERS . "` SET `up_count`=`up_count`+'" . (int)$result['up_count'] . "', `up_bytes`=`up_bytes`+'" . (int)$result['up_bytes'] . "', `down_count`=`down_count`+'" . (int)$result['down_count'] . "', `down_bytes`=`down_bytes`+'" . (int)$result['down_bytes'] . "' WHERE `username`='" . $db->escape($userinfo['loginname']) . "'");
|
$db->query("UPDATE `" . TABLE_FTP_USERS . "` SET `up_count`=`up_count`+'" . (int)$result['up_count'] . "', `up_bytes`=`up_bytes`+'" . (int)$result['up_bytes'] . "', `down_count`=`down_count`+'" . (int)$result['down_count'] . "', `down_bytes`=`down_bytes`+'" . (int)$result['down_bytes'] . "' WHERE `username`='" . $db->escape($userinfo['loginname']) . "'");
|
||||||
$result = $db->query_first("SELECT `username`, `homedir` FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
$result = $db->query("SELECT `username` FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
||||||
$db->query("DELETE FROM `" . TABLE_FTP_QUOTATALLIES . "` WHERE `name` = '" . $db->escape($result['username']) . "'");
|
while($row = $db->fetch_array($result))
|
||||||
|
{
|
||||||
|
$db->query("DELETE FROM `" . TABLE_FTP_QUOTATALLIES . "` WHERE `name` = '" . $db->escape($row['username']) . "'");
|
||||||
|
}
|
||||||
$db->query("DELETE FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
$db->query("DELETE FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
||||||
$log->logAction(USR_ACTION, LOG_INFO, "deleted ftp-account '" . $result['username'] . "'");
|
$log->logAction(USR_ACTION, LOG_INFO, "deleted ftp-account '" . $result['username'] . "'");
|
||||||
$db->query("UPDATE `" . TABLE_FTP_GROUPS . "` SET `members`=REPLACE(`members`,'," . $db->escape($result['username']) . "','') WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
|
$db->query("UPDATE `" . TABLE_FTP_GROUPS . "` SET `members`=REPLACE(`members`,'," . $db->escape($result['username']) . "','') WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
|
||||||
|
|
||||||
|
// $db->query("DELETE FROM `".TABLE_FTP_GROUPS."` WHERE `customerid`='".$userinfo['customerid']."' AND `id`='$id'");
|
||||||
|
|
||||||
if($userinfo['ftps_used'] == '1')
|
if($userinfo['ftps_used'] == '1')
|
||||||
{
|
{
|
||||||
$resetaccnumber = " , `ftp_lastaccountnumber`='0'";
|
$resetaccnumber = " , `ftp_lastaccountnumber`='0'";
|
||||||
@@ -112,19 +117,12 @@ elseif($page == 'accounts')
|
|||||||
$resetaccnumber = '';
|
$resetaccnumber = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
// refs #293
|
|
||||||
if(isset($_POST['delete_userfiles'])
|
|
||||||
&& (int)$_POST['delete_userfiles'] == 1)
|
|
||||||
{
|
|
||||||
inserttask('8', $userinfo['loginname'], $result['homedir']);
|
|
||||||
}
|
|
||||||
|
|
||||||
$result = $db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `ftps_used`=`ftps_used`-1 $resetaccnumber WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
|
$result = $db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `ftps_used`=`ftps_used`-1 $resetaccnumber WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
|
||||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ask_yesno_withcheckbox('ftp_reallydelete', 'admin_customer_alsoremoveftphomedir', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $result['username']);
|
ask_yesno('ftp_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $result['username']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -144,12 +142,6 @@ elseif($page == 'accounts')
|
|||||||
$password = validate($_POST['ftp_password'], 'password');
|
$password = validate($_POST['ftp_password'], 'password');
|
||||||
$password = validatePassword($password);
|
$password = validatePassword($password);
|
||||||
|
|
||||||
$sendinfomail = intval($_POST['sendinfomail']);
|
|
||||||
if($sendinfomail != 1)
|
|
||||||
{
|
|
||||||
$sendinfomail = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if($settings['customer']['ftpatdomain'] == '1')
|
if($settings['customer']['ftpatdomain'] == '1')
|
||||||
{
|
{
|
||||||
$ftpusername = validate($_POST['ftp_username'], 'username', '/^[a-zA-Z0-9][a-zA-Z0-9\-_]+\$?$/');
|
$ftpusername = validate($_POST['ftp_username'], 'username', '/^[a-zA-Z0-9][a-zA-Z0-9\-_]+\$?$/');
|
||||||
@@ -192,90 +184,32 @@ elseif($page == 'accounts')
|
|||||||
$result = $db->query("SELECT `bytes_in_used` FROM `" . TABLE_FTP_QUOTATALLIES . "` WHERE `name` = '" . $userinfo['loginname'] . "'");
|
$result = $db->query("SELECT `bytes_in_used` FROM `" . TABLE_FTP_QUOTATALLIES . "` WHERE `name` = '" . $userinfo['loginname'] . "'");
|
||||||
while($row = $db->fetch_array($result))
|
while($row = $db->fetch_array($result))
|
||||||
{
|
{
|
||||||
$db->query("INSERT INTO `" . TABLE_FTP_QUOTATALLIES . "` (`name`, `quota_type`, `bytes_in_used`, `bytes_out_used`, `bytes_xfer_used`, `files_in_used`, `files_out_used`, `files_xfer_used`) VALUES ('" . $db->escape($username) . "', 'user', '" . $db->escape($row['bytes_in_used']) . "', '0', '0', '0', '0', '0')");
|
$db->query("INSERT INTO `" . TABLE_FTP_QUOTATALLIES . "` (`name`, `quota_type`, `bytes_in_used`, `bytes_out_used`, `bytes_xfer_used`, `files_in_used`, `files_out_used`, `files_xfer_used`) VALUES ('" . $db->escape($username) . "', 'user', '" . $db->escape($row[bytes_in_used]) . "', '0', '0', '0', '0', '0')");
|
||||||
}
|
}
|
||||||
$db->query("UPDATE `" . TABLE_FTP_GROUPS . "` SET `members`=CONCAT_WS(',',`members`,'" . $db->escape($username) . "') WHERE `customerid`='" . $userinfo['customerid'] . "' AND `gid`='" . (int)$userinfo['guid'] . "'");
|
$db->query("UPDATE `" . TABLE_FTP_GROUPS . "` SET `members`=CONCAT_WS(',',`members`,'" . $db->escape($username) . "') WHERE `customerid`='" . $userinfo['customerid'] . "' AND `gid`='" . (int)$userinfo['guid'] . "'");
|
||||||
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `ftps_used`=`ftps_used`+1, `ftp_lastaccountnumber`=`ftp_lastaccountnumber`+1 WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
|
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `ftps_used`=`ftps_used`+1, `ftp_lastaccountnumber`=`ftp_lastaccountnumber`+1 WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
|
||||||
|
|
||||||
$log->logAction(USR_ACTION, LOG_INFO, "added ftp-account '" . $username . " (" . $path . ")'");
|
$log->logAction(USR_ACTION, LOG_INFO, "added ftp-account '" . $username . " (" . $path . ")'");
|
||||||
inserttask(5);
|
inserttask(5);
|
||||||
|
|
||||||
if($sendinfomail == 1)
|
|
||||||
{
|
|
||||||
$replace_arr = array(
|
|
||||||
'CUST_NAME' => getCorrectUserSalutation($userinfo),
|
|
||||||
'USR_NAME' => $username,
|
|
||||||
'USR_PASS' => $password,
|
|
||||||
'USR_PATH' => makeCorrectDir(substr($path, strlen($userinfo['documentroot'])))
|
|
||||||
);
|
|
||||||
|
|
||||||
$def_language = $userinfo['def_language'];
|
|
||||||
$result = $db->query_first('SELECT `value` FROM `' . TABLE_PANEL_TEMPLATES . '` WHERE `adminid`=\'' . (int)$userinfo['adminid'] . '\' AND `language`=\'' . $db->escape($def_language) . '\' AND `templategroup`=\'mails\' AND `varname`=\'new_ftpaccount_by_customer_subject\'');
|
|
||||||
$mail_subject = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $lng['customer']['ftp_add']['infomail_subject']), $replace_arr));
|
|
||||||
$result = $db->query_first('SELECT `value` FROM `' . TABLE_PANEL_TEMPLATES . '` WHERE `adminid`=\'' . (int)$userinfo['adminid'] . '\' AND `language`=\'' . $db->escape($def_language) . '\' AND `templategroup`=\'mails\' AND `varname`=\'new_ftpaccount_by_customer_mailbody\'');
|
|
||||||
$mail_body = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $lng['customer']['ftp_add']['infomail_body']['main']), $replace_arr));
|
|
||||||
|
|
||||||
$_mailerror = false;
|
|
||||||
try {
|
|
||||||
$mail->Subject = $mail_subject;
|
|
||||||
$mail->AltBody = $mail_body;
|
|
||||||
$mail->MsgHTML(str_replace("\n", "<br />", $mail_body));
|
|
||||||
$mail->AddAddress($userinfo['email'], getCorrectUserSalutation($userinfo));
|
|
||||||
$mail->Send();
|
|
||||||
} catch(phpmailerException $e) {
|
|
||||||
$mailerr_msg = $e->errorMessage();
|
|
||||||
$_mailerror = true;
|
|
||||||
} catch (Exception $e) {
|
|
||||||
$mailerr_msg = $e->getMessage();
|
|
||||||
$_mailerror = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($_mailerror) {
|
|
||||||
$log->logAction(USR_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
|
|
||||||
standard_error('errorsendingmail', $userinfo['email']);
|
|
||||||
}
|
|
||||||
|
|
||||||
$mail->ClearAddresses();
|
|
||||||
}
|
|
||||||
|
|
||||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit'], '/');
|
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit']);
|
||||||
|
|
||||||
if($settings['customer']['ftpatdomain'] == '1')
|
if($settings['customer']['ftpatdomain'] == '1')
|
||||||
{
|
{
|
||||||
$domainlist = array();
|
|
||||||
$domains = '';
|
$domains = '';
|
||||||
|
|
||||||
$result_domains = $db->query("SELECT `domain` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
|
$result_domains = $db->query("SELECT `domain` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
|
||||||
|
|
||||||
while($row_domain = $db->fetch_array($result_domains))
|
while($row_domain = $db->fetch_array($result_domains))
|
||||||
{
|
{
|
||||||
$domainlist[] = $row_domain['domain'];
|
$domains.= makeoption($idna_convert->decode($row_domain['domain']), $row_domain['domain']);
|
||||||
}
|
|
||||||
|
|
||||||
sort($domainlist);
|
|
||||||
|
|
||||||
if(isset($domainlist[0]) && $domainlist[0] != '')
|
|
||||||
{
|
|
||||||
foreach($domainlist as $dom)
|
|
||||||
{
|
|
||||||
$domains .= makeoption($idna_convert->decode($dom), $dom);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#$sendinfomail = makeyesno('sendinfomail', '1', '0', '0');
|
|
||||||
|
|
||||||
$ftp_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/ftp/formfield.ftp_add.php';
|
|
||||||
$ftp_add_form = htmlform::genHTMLForm($ftp_add_data);
|
|
||||||
|
|
||||||
$title = $ftp_add_data['ftp_add']['title'];
|
|
||||||
$image = $ftp_add_data['ftp_add']['image'];
|
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("ftp/accounts_add") . "\";");
|
eval("echo \"" . getTemplate("ftp/accounts_add") . "\";");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -324,7 +258,6 @@ elseif($page == 'accounts')
|
|||||||
if(!file_exists($path))
|
if(!file_exists($path))
|
||||||
{
|
{
|
||||||
mkDirWithCorrectOwnership($userinfo['documentroot'], $path, $result['uid'], $result['gid']);
|
mkDirWithCorrectOwnership($userinfo['documentroot'], $path, $result['uid'], $result['gid']);
|
||||||
inserttask(5); /* Let the cronjob do the rest */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$log->logAction(USR_ACTION, LOG_INFO, "updated ftp-account homdir for '" . $result['username'] . "'");
|
$log->logAction(USR_ACTION, LOG_INFO, "updated ftp-account homdir for '" . $result['username'] . "'");
|
||||||
@@ -359,13 +292,7 @@ elseif($page == 'accounts')
|
|||||||
$domains.= makeoption($idna_convert->decode($row_domain['domain']), $row_domain['domain']);
|
$domains.= makeoption($idna_convert->decode($row_domain['domain']), $row_domain['domain']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$ftp_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/ftp/formfield.ftp_edit.php';
|
|
||||||
$ftp_edit_form = htmlform::genHTMLForm($ftp_edit_data);
|
|
||||||
|
|
||||||
$title = $ftp_edit_data['ftp_edit']['title'];
|
|
||||||
$image = $ftp_edit_data['ftp_edit']['image'];
|
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("ftp/accounts_edit") . "\";");
|
eval("echo \"" . getTemplate("ftp/accounts_edit") . "\";");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ if($page == 'overview')
|
|||||||
$userinfo['diskspace_used'] = round($userinfo['diskspace_used'] / 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'] = round($userinfo['traffic'] / (1024 * 1024), $settings['panel']['decimal_places']);
|
||||||
$userinfo['traffic_used'] = round($userinfo['traffic_used'] / (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 email_autoresponder ftps tickets subdomains aps_packages');
|
$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 = 0;
|
||||||
$opentickets = $db->query_first('SELECT COUNT(`id`) as `count` FROM `' . TABLE_PANEL_TICKETS . '`
|
$opentickets = $db->query_first('SELECT COUNT(`id`) as `count` FROM `' . TABLE_PANEL_TICKETS . '`
|
||||||
WHERE `customerid` = "' . $userinfo['customerid'] . '"
|
WHERE `customerid` = "' . $userinfo['customerid'] . '"
|
||||||
@@ -172,46 +172,13 @@ elseif($page == 'change_language')
|
|||||||
{
|
{
|
||||||
$language_options = '';
|
$language_options = '';
|
||||||
|
|
||||||
$default_lang = $settings['panel']['standardlanguage'];
|
|
||||||
if($userinfo['def_language'] != '') {
|
|
||||||
$default_lang = $userinfo['def_language'];
|
|
||||||
}
|
|
||||||
|
|
||||||
while(list($language_file, $language_name) = each($languages))
|
while(list($language_file, $language_name) = each($languages))
|
||||||
{
|
{
|
||||||
$language_options.= makeoption($language_name, $language_file, $default_lang, true);
|
$language_options.= makeoption($language_name, $language_file, $userinfo['def_language'], true);
|
||||||
}
|
}
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("index/change_language") . "\";");
|
eval("echo \"" . getTemplate("index/change_language") . "\";");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elseif($page == 'change_theme')
|
|
||||||
{
|
|
||||||
if(isset($_POST['send'])
|
|
||||||
&& $_POST['send'] == 'send'
|
|
||||||
) {
|
|
||||||
$theme = validate($_POST['theme'], 'theme');
|
|
||||||
|
|
||||||
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `theme`='" . $db->escape($theme) . "' WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
|
|
||||||
$db->query("UPDATE `" . TABLE_PANEL_SESSIONS . "` SET `theme`='" . $db->escape($theme) . "' WHERE `hash`='" . $db->escape($s) . "'");
|
|
||||||
$log->logAction(USR_ACTION, LOG_NOTICE, "changed default theme to '" . $theme . "'");
|
|
||||||
redirectTo($filename, Array('s' => $s));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$theme_options = '';
|
|
||||||
|
|
||||||
$default_theme = $settings['panel']['default_theme'];
|
?>
|
||||||
if($userinfo['theme'] != '') {
|
|
||||||
$default_theme = $userinfo['theme'];
|
|
||||||
}
|
|
||||||
|
|
||||||
$themes_avail = getThemes();
|
|
||||||
foreach($themes_avail as $t)
|
|
||||||
{
|
|
||||||
$theme_options.= makeoption($t, $t, $default_theme, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("index/change_theme") . "\";");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ elseif($page == 'mysqls')
|
|||||||
'description' => $lng['mysql']['databasedescription']
|
'description' => $lng['mysql']['databasedescription']
|
||||||
);
|
);
|
||||||
$paging = new paging($userinfo, $db, TABLE_PANEL_DATABASES, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
|
$paging = new paging($userinfo, $db, TABLE_PANEL_DATABASES, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
|
||||||
$result = $db->query("SELECT * FROM `" . TABLE_PANEL_DATABASES . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
|
$result = $db->query("SELECT `id`, `databasename`, `description`, `dbserver` FROM `" . TABLE_PANEL_DATABASES . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
|
||||||
$paging->setEntries($db->num_rows($result));
|
$paging->setEntries($db->num_rows($result));
|
||||||
$sortcode = $paging->getHtmlSortCode($lng);
|
$sortcode = $paging->getHtmlSortCode($lng);
|
||||||
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
|
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
|
||||||
@@ -80,7 +80,7 @@ elseif($page == 'mysqls')
|
|||||||
elseif($action == 'delete'
|
elseif($action == 'delete'
|
||||||
&& $id != 0)
|
&& $id != 0)
|
||||||
{
|
{
|
||||||
$result = $db->query_first('SELECT `id`, `databasename`, `description`, `dbserver` FROM `' . TABLE_PANEL_DATABASES . '` WHERE `customerid`="' . (int)$userinfo['customerid'] . '" AND `id`="' . (int)$id . '"');
|
$result = $db->query_first('SELECT `id`, `databasename`, `dbserver` FROM `' . TABLE_PANEL_DATABASES . '` WHERE `customerid`="' . (int)$userinfo['customerid'] . '" AND `id`="' . (int)$id . '"');
|
||||||
|
|
||||||
if(isset($result['databasename'])
|
if(isset($result['databasename'])
|
||||||
&& $result['databasename'] != '')
|
&& $result['databasename'] != '')
|
||||||
@@ -126,11 +126,7 @@ elseif($page == 'mysqls')
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$dbnamedesc = $result['databasename'];
|
ask_yesno('mysql_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $result['databasename']);
|
||||||
if(isset($result['description']) && $result['description'] != '') {
|
|
||||||
$dbnamedesc.= ' ('.$result['description'].')';
|
|
||||||
}
|
|
||||||
ask_yesno('mysql_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $dbnamedesc);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -198,10 +194,11 @@ elseif($page == 'mysqls')
|
|||||||
|
|
||||||
if($sendinfomail == 1)
|
if($sendinfomail == 1)
|
||||||
{
|
{
|
||||||
$pma = $lng['admin']['notgiven'];
|
$pma = '';
|
||||||
if($settings['panel']['phpmyadmin_url'] != '')
|
if($settings['panel']['phpmyadmin_url'] != '')
|
||||||
{
|
{
|
||||||
$pma = $settings['panel']['phpmyadmin_url'];
|
$r_arr = array('URI' => $settings['panel']['phpmyadmin_url']);
|
||||||
|
$pma = replace_variables($lng['customer']['mysql_add']['infomail_body']['pma'], $r_arr);
|
||||||
}
|
}
|
||||||
|
|
||||||
$replace_arr = array(
|
$replace_arr = array(
|
||||||
@@ -213,15 +210,11 @@ elseif($page == 'mysqls')
|
|||||||
'PMA_URI' => $pma
|
'PMA_URI' => $pma
|
||||||
);
|
);
|
||||||
|
|
||||||
$def_language = $userinfo['def_language'];
|
$mail_body = replace_variables($lng['customer']['mysql_add']['infomail_body']['main'], $replace_arr);
|
||||||
$result = $db->query_first('SELECT `value` FROM `' . TABLE_PANEL_TEMPLATES . '` WHERE `adminid`=\'' . (int)$userinfo['adminid'] . '\' AND `language`=\'' . $db->escape($def_language) . '\' AND `templategroup`=\'mails\' AND `varname`=\'new_database_by_customer_subject\'');
|
|
||||||
$mail_subject = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $lng['customer']['mysql_add']['infomail_subject']), $replace_arr));
|
|
||||||
$result = $db->query_first('SELECT `value` FROM `' . TABLE_PANEL_TEMPLATES . '` WHERE `adminid`=\'' . (int)$userinfo['adminid'] . '\' AND `language`=\'' . $db->escape($def_language) . '\' AND `templategroup`=\'mails\' AND `varname`=\'new_database_by_customer_mailbody\'');
|
|
||||||
$mail_body = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $lng['customer']['mysql_add']['infomail_body']['main']), $replace_arr));
|
|
||||||
|
|
||||||
$_mailerror = false;
|
$_mailerror = false;
|
||||||
try {
|
try {
|
||||||
$mail->Subject = $mail_subject;
|
$mail->Subject = $lng['customer']['mysql_add']['infomail_subject'];
|
||||||
$mail->AltBody = $mail_body;
|
$mail->AltBody = $mail_body;
|
||||||
$mail->MsgHTML(str_replace("\n", "<br />", $mail_body));
|
$mail->MsgHTML(str_replace("\n", "<br />", $mail_body));
|
||||||
$mail->AddAddress($userinfo['email'], getCorrectUserSalutation($userinfo));
|
$mail->AddAddress($userinfo['email'], getCorrectUserSalutation($userinfo));
|
||||||
@@ -254,13 +247,7 @@ elseif($page == 'mysqls')
|
|||||||
$mysql_servers .= makeoption($mysql_server_details['caption'], $mysql_server);
|
$mysql_servers .= makeoption($mysql_server_details['caption'], $mysql_server);
|
||||||
}
|
}
|
||||||
|
|
||||||
#$sendinfomail = makeyesno('sendinfomail', '1', '0', '0');
|
$sendinfomail = makeyesno('sendinfomail', '1', '0', '0');
|
||||||
|
|
||||||
$mysql_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/mysql/formfield.mysql_add.php';
|
|
||||||
$mysql_add_form = htmlform::genHTMLForm($mysql_add_data);
|
|
||||||
|
|
||||||
$title = $mysql_add_data['mysql_add']['title'];
|
|
||||||
$image = $mysql_add_data['mysql_add']['image'];
|
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("mysql/mysqls_add") . "\";");
|
eval("echo \"" . getTemplate("mysql/mysqls_add") . "\";");
|
||||||
}
|
}
|
||||||
@@ -283,14 +270,14 @@ elseif($page == 'mysqls')
|
|||||||
&& $_POST['send'] == 'send')
|
&& $_POST['send'] == 'send')
|
||||||
{
|
{
|
||||||
// Only change Password if it is set, do nothing if it is empty! -- PH 2004-11-29
|
// Only change Password if it is set, do nothing if it is empty! -- PH 2004-11-29
|
||||||
|
|
||||||
$password = validate($_POST['mysql_password'], 'password');
|
$password = validate($_POST['mysql_password'], 'password');
|
||||||
|
$password = validatePassword($password);
|
||||||
|
|
||||||
if($password != '')
|
if($password != '')
|
||||||
{
|
{
|
||||||
// validate password
|
|
||||||
$password = validatePassword($password);
|
|
||||||
|
|
||||||
// Begin root-session
|
// Begin root-session
|
||||||
|
|
||||||
$db_root = new db($sql_root[$result['dbserver']]['host'], $sql_root[$result['dbserver']]['user'], $sql_root[$result['dbserver']]['password'], '');
|
$db_root = new db($sql_root[$result['dbserver']]['host'], $sql_root[$result['dbserver']]['user'], $sql_root[$result['dbserver']]['password'], '');
|
||||||
unset($db_root->password);
|
unset($db_root->password);
|
||||||
foreach(array_map('trim', explode(',', $settings['system']['mysql_access_host'])) as $mysql_access_host)
|
foreach(array_map('trim', explode(',', $settings['system']['mysql_access_host'])) as $mysql_access_host)
|
||||||
@@ -313,16 +300,10 @@ elseif($page == 'mysqls')
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$mysql_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/mysql/formfield.mysql_edit.php';
|
|
||||||
$mysql_edit_form = htmlform::genHTMLForm($mysql_edit_data);
|
|
||||||
|
|
||||||
$title = $mysql_edit_data['mysql_edit']['title'];
|
|
||||||
$image = $mysql_edit_data['mysql_edit']['image'];
|
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("mysql/mysqls_edit") . "\";");
|
eval("echo \"" . getTemplate("mysql/mysqls_edit") . "\";");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -98,7 +98,6 @@ elseif($page == 'tickets')
|
|||||||
$cananswer = 0;
|
$cananswer = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$row['subject'] = html_entity_decode($row['subject']);
|
|
||||||
if(strlen($row['subject']) > 20)
|
if(strlen($row['subject']) > 20)
|
||||||
{
|
{
|
||||||
$row['subject'] = substr($row['subject'], 0, 17) . '...';
|
$row['subject'] = substr($row['subject'], 0, 17) . '...';
|
||||||
@@ -247,13 +246,6 @@ elseif($page == 'tickets')
|
|||||||
}
|
}
|
||||||
|
|
||||||
$ticketsopen = (int)$opentickets['count'];
|
$ticketsopen = (int)$opentickets['count'];
|
||||||
|
|
||||||
$ticket_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/ticket/formfield.ticket_add.php';
|
|
||||||
$ticket_add_form = htmlform::genHTMLForm($ticket_add_data);
|
|
||||||
|
|
||||||
$title = $ticket_add_data['ticket_add']['title'];
|
|
||||||
$image = $ticket_add_data['ticket_add']['image'];
|
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("ticket/tickets_new") . "\";");
|
eval("echo \"" . getTemplate("ticket/tickets_new") . "\";");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -367,12 +359,6 @@ elseif($page == 'tickets')
|
|||||||
|
|
||||||
// don't forget the main-ticket!
|
// don't forget the main-ticket!
|
||||||
|
|
||||||
$ticket_reply_data = include_once dirname(__FILE__).'/lib/formfields/customer/ticket/formfield.ticket_reply.php';
|
|
||||||
$ticket_reply_form = htmlform::genHTMLForm($ticket_reply_data);
|
|
||||||
|
|
||||||
$title = $ticket_reply_data['ticket_reply']['title'];
|
|
||||||
$image = $ticket_reply_data['ticket_reply']['image'];
|
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("ticket/tickets_reply") . "\";");
|
eval("echo \"" . getTemplate("ticket/tickets_reply") . "\";");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 53 B |
|
Before Width: | Height: | Size: 281 B |
|
Before Width: | Height: | Size: 983 B |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 889 B |
|
Before Width: | Height: | Size: 973 B |
|
Before Width: | Height: | Size: 1013 B |
|
Before Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 537 B |
|
Before Width: | Height: | Size: 655 B |
|
Before Width: | Height: | Size: 1013 B |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1014 B |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1006 B |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1013 B |
|
Before Width: | Height: | Size: 879 B |
|
Before Width: | Height: | Size: 924 B |
|
Before Width: | Height: | Size: 945 B |
|
Before Width: | Height: | Size: 966 B |
|
Before Width: | Height: | Size: 952 B |
|
Before Width: | Height: | Size: 950 B |
|
Before Width: | Height: | Size: 961 B |
|
Before Width: | Height: | Size: 921 B |
|
Before Width: | Height: | Size: 940 B |
|
Before Width: | Height: | Size: 889 B |
|
Before Width: | Height: | Size: 922 B |
|
Before Width: | Height: | Size: 739 B |
|
Before Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1019 B |
|
Before Width: | Height: | Size: 804 B |
|
Before Width: | Height: | Size: 976 B |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 970 B |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 948 B |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 779 B |
|
Before Width: | Height: | Size: 974 B |
|
Before Width: | Height: | Size: 984 B |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 974 B |