auto-format all files; add table-definitions to test-bootstrap file

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2018-12-21 12:24:07 +01:00
parent 1ff784198c
commit 97b5439c0d
209 changed files with 6840 additions and 4534 deletions

1
.gitignore vendored
View File

@@ -16,3 +16,4 @@ logs/*
!templates/Sparkle/ !templates/Sparkle/
!templates/misc/ !templates/misc/
templates/Froxlor/assets/img/logo_custom.png templates/Froxlor/assets/img/logo_custom.png
vendor/

View File

@@ -80,11 +80,9 @@ if ($userinfo['type_2fa'] == '0') {
foreach ($type_select_values as $_val => $_type) { foreach ($type_select_values as $_val => $_type) {
$type_select .= makeoption($_type, $_val); $type_select .= makeoption($_type, $_val);
} }
} } elseif ($userinfo['type_2fa'] == '1') {
elseif ($userinfo['type_2fa'] == '1') {
// email 2fa enabled // email 2fa enabled
} } elseif ($userinfo['type_2fa'] == '2') {
elseif ($userinfo['type_2fa'] == '2') {
// authenticator 2fa enabled // authenticator 2fa enabled
$ga_qrcode = $tfa->getQRCodeImageAsDataUri($userinfo['loginname'], $userinfo['data_2fa']); $ga_qrcode = $tfa->getQRCodeImageAsDataUri($userinfo['loginname'], $userinfo['data_2fa']);
} }

View File

@@ -16,31 +16,36 @@
* @package Language * @package Language
* *
*/ */
return array( return array(
'groups' => array( 'groups' => array(
'panel' => array( 'panel' => array(
'title' => $lng['admin']['panelsettings'], 'title' => $lng['admin']['panelsettings'],
'fields' => array( 'fields' => array(
'panel_standardlanguage' => array( 'panel_standardlanguage' => array(
'label' => array('title' => $lng['login']['language'], 'description' => $lng['serversettings']['language']['description']), 'label' => array(
'title' => $lng['login']['language'],
'description' => $lng['serversettings']['language']['description']
),
'settinggroup' => 'panel', 'settinggroup' => 'panel',
'varname' => 'standardlanguage', 'varname' => 'standardlanguage',
'type' => 'option', 'type' => 'option',
'default' => 'English', 'default' => 'English',
'option_mode' => 'one', 'option_mode' => 'one',
'option_options_method' => 'getLanguages', 'option_options_method' => 'getLanguages',
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'panel_default_theme' => array( 'panel_default_theme' => array(
'label' => array('title' => $lng['panel']['theme'], 'description' => $lng['serversettings']['default_theme']), 'label' => array(
'title' => $lng['panel']['theme'],
'description' => $lng['serversettings']['default_theme']
),
'settinggroup' => 'panel', 'settinggroup' => 'panel',
'varname' => 'default_theme', 'varname' => 'default_theme',
'type' => 'option', 'type' => 'option',
'default' => 'Froxlor', 'default' => 'Froxlor',
'option_mode' => 'one', 'option_mode' => 'one',
'option_options_method' => 'getThemes', 'option_options_method' => 'getThemes',
'save_method' => 'storeSettingDefaultTheme', 'save_method' => 'storeSettingDefaultTheme'
), ),
'panel_allow_theme_change_customer' => array( 'panel_allow_theme_change_customer' => array(
'label' => $lng['serversettings']['panel_allow_theme_change_customer'], 'label' => $lng['serversettings']['panel_allow_theme_change_customer'],
@@ -48,7 +53,7 @@ return array(
'varname' => 'allow_theme_change_customer', 'varname' => 'allow_theme_change_customer',
'type' => 'bool', 'type' => 'bool',
'default' => true, 'default' => true,
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'panel_allow_theme_change_admin' => array( 'panel_allow_theme_change_admin' => array(
'label' => $lng['serversettings']['panel_allow_theme_change_admin'], 'label' => $lng['serversettings']['panel_allow_theme_change_admin'],
@@ -64,7 +69,7 @@ return array(
'varname' => 'natsorting', 'varname' => 'natsorting',
'type' => 'bool', 'type' => 'bool',
'default' => false, 'default' => false,
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'panel_no_robots' => array( 'panel_no_robots' => array(
'label' => $lng['serversettings']['no_robots'], 'label' => $lng['serversettings']['no_robots'],
@@ -72,7 +77,7 @@ return array(
'varname' => 'no_robots', 'varname' => 'no_robots',
'type' => 'bool', 'type' => 'bool',
'default' => true, 'default' => true,
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'panel_paging' => array( 'panel_paging' => array(
'label' => $lng['serversettings']['paging'], 'label' => $lng['serversettings']['paging'],
@@ -81,7 +86,7 @@ return array(
'type' => 'int', 'type' => 'int',
'int_min' => 0, 'int_min' => 0,
'default' => 0, 'default' => 0,
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'panel_pathedit' => array( 'panel_pathedit' => array(
'label' => $lng['serversettings']['pathedit'], 'label' => $lng['serversettings']['pathedit'],
@@ -90,8 +95,11 @@ 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(
'save_method' => 'storeSettingField', 'Manual' => $lng['serversettings']['manual'],
'Dropdown' => $lng['serversettings']['dropdown']
),
'save_method' => 'storeSettingField'
), ),
'panel_adminmail' => array( 'panel_adminmail' => array(
'label' => $lng['serversettings']['adminmail'], 'label' => $lng['serversettings']['adminmail'],
@@ -101,7 +109,7 @@ return array(
'string_type' => 'mail', 'string_type' => 'mail',
'string_emptyallowed' => false, 'string_emptyallowed' => false,
'default' => '', 'default' => '',
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'panel_adminmail_defname' => array( 'panel_adminmail_defname' => array(
'label' => $lng['serversettings']['adminmail_defname'], 'label' => $lng['serversettings']['adminmail_defname'],
@@ -109,7 +117,7 @@ return array(
'varname' => 'adminmail_defname', 'varname' => 'adminmail_defname',
'type' => 'string', 'type' => 'string',
'default' => 'Froxlor Administrator', 'default' => 'Froxlor Administrator',
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'panel_adminmail_return' => array( 'panel_adminmail_return' => array(
'label' => $lng['serversettings']['adminmail_return'], 'label' => $lng['serversettings']['adminmail_return'],
@@ -119,7 +127,7 @@ return array(
'string_type' => 'mail', 'string_type' => 'mail',
'string_emptyallowed' => true, 'string_emptyallowed' => true,
'default' => '', 'default' => '',
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'panel_decimal_places' => array( 'panel_decimal_places' => array(
'label' => $lng['serversettings']['decimal_places'], 'label' => $lng['serversettings']['decimal_places'],
@@ -129,7 +137,7 @@ return array(
'int_min' => 0, 'int_min' => 0,
'int_max' => 15, 'int_max' => 15,
'default' => 4, 'default' => 4,
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'panel_phpmyadmin_url' => array( 'panel_phpmyadmin_url' => array(
'label' => $lng['serversettings']['phpmyadmin_url'], 'label' => $lng['serversettings']['phpmyadmin_url'],
@@ -139,7 +147,7 @@ return array(
'string_type' => 'url', 'string_type' => 'url',
'string_emptyallowed' => true, 'string_emptyallowed' => true,
'default' => '', 'default' => '',
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'panel_webmail_url' => array( 'panel_webmail_url' => array(
'label' => $lng['serversettings']['webmail_url'], 'label' => $lng['serversettings']['webmail_url'],
@@ -149,7 +157,7 @@ return array(
'string_type' => 'url', 'string_type' => 'url',
'string_emptyallowed' => true, 'string_emptyallowed' => true,
'default' => '', 'default' => '',
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'panel_webftp_url' => array( 'panel_webftp_url' => array(
'label' => $lng['serversettings']['webftp_url'], 'label' => $lng['serversettings']['webftp_url'],
@@ -159,7 +167,7 @@ return array(
'string_type' => 'url', 'string_type' => 'url',
'string_emptyallowed' => true, 'string_emptyallowed' => true,
'default' => '', 'default' => '',
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'admin_show_version_login' => array( 'admin_show_version_login' => array(
'label' => $lng['admin']['show_version_login'], 'label' => $lng['admin']['show_version_login'],
@@ -167,7 +175,7 @@ return array(
'varname' => 'show_version_login', 'varname' => 'show_version_login',
'type' => 'bool', 'type' => 'bool',
'default' => false, 'default' => false,
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'admin_show_version_footer' => array( 'admin_show_version_footer' => array(
'label' => $lng['admin']['show_version_footer'], 'label' => $lng['admin']['show_version_footer'],
@@ -175,7 +183,7 @@ return array(
'varname' => 'show_version_footer', 'varname' => 'show_version_footer',
'type' => 'bool', 'type' => 'bool',
'default' => false, 'default' => false,
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'admin_show_news_feed' => array( 'admin_show_news_feed' => array(
'label' => $lng['admin']['show_news_feed'], 'label' => $lng['admin']['show_news_feed'],
@@ -183,7 +191,7 @@ return array(
'varname' => 'show_news_feed', 'varname' => 'show_news_feed',
'type' => 'bool', 'type' => 'bool',
'default' => false, 'default' => false,
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'customer_show_news_feed' => array( 'customer_show_news_feed' => array(
'label' => $lng['admin']['customer_show_news_feed'], 'label' => $lng['admin']['customer_show_news_feed'],
@@ -191,7 +199,7 @@ return array(
'varname' => 'show_news_feed', 'varname' => 'show_news_feed',
'type' => 'bool', 'type' => 'bool',
'default' => false, 'default' => false,
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'customer_news_feed_url' => array( 'customer_news_feed_url' => array(
'label' => $lng['admin']['customer_news_feed_url'], 'label' => $lng['admin']['customer_news_feed_url'],
@@ -201,7 +209,7 @@ return array(
'string_type' => 'url', 'string_type' => 'url',
'string_emptyallowed' => true, 'string_emptyallowed' => true,
'default' => '', 'default' => '',
'save_method' => 'storeSettingField', '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'],
@@ -209,7 +217,7 @@ return array(
'varname' => 'allow_domain_change_admin', 'varname' => 'allow_domain_change_admin',
'type' => 'bool', 'type' => 'bool',
'default' => false, 'default' => false,
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'panel_allow_domain_change_customer' => array( 'panel_allow_domain_change_customer' => array(
'label' => $lng['serversettings']['panel_allow_domain_change_customer'], 'label' => $lng['serversettings']['panel_allow_domain_change_customer'],
@@ -217,7 +225,7 @@ return array(
'varname' => 'allow_domain_change_customer', 'varname' => 'allow_domain_change_customer',
'type' => 'bool', 'type' => 'bool',
'default' => false, 'default' => false,
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'panel_phpconfigs_hidestdsubdomain' => array( 'panel_phpconfigs_hidestdsubdomain' => array(
'label' => $lng['serversettings']['panel_phpconfigs_hidestdsubdomain'], 'label' => $lng['serversettings']['panel_phpconfigs_hidestdsubdomain'],
@@ -225,7 +233,7 @@ return array(
'varname' => 'phpconfigs_hidestdsubdomain', 'varname' => 'phpconfigs_hidestdsubdomain',
'type' => 'bool', 'type' => 'bool',
'default' => false, 'default' => false,
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'panel_customer_hide_options' => array( 'panel_customer_hide_options' => array(
'label' => $lng['serversettings']['panel_customer_hide_options'], 'label' => $lng['serversettings']['panel_customer_hide_options'],
@@ -248,13 +256,13 @@ return array(
'traffic' => $lng['menue']['traffic']['traffic'], 'traffic' => $lng['menue']['traffic']['traffic'],
'traffic.http' => $lng['menue']['traffic']['traffic'] . " / HTTP", 'traffic.http' => $lng['menue']['traffic']['traffic'] . " / HTTP",
'traffic.ftp' => $lng['menue']['traffic']['traffic'] . " / FTP", 'traffic.ftp' => $lng['menue']['traffic']['traffic'] . " / FTP",
'traffic.mail' => $lng['menue']['traffic']['traffic']." / Mail", 'traffic.mail' => $lng['menue']['traffic']['traffic'] . " / Mail"
),
'save_method' => 'storeSettingField',
),
),
),
), ),
'save_method' => 'storeSettingField'
)
)
)
)
); );
?> ?>

View File

@@ -16,7 +16,6 @@
* @package Settings * @package Settings
* *
*/ */
return array( return array(
'groups' => array( 'groups' => array(
'accounts' => array( 'accounts' => array(
@@ -28,7 +27,7 @@ return array(
'varname' => 'sessiontimeout', 'varname' => 'sessiontimeout',
'type' => 'int', 'type' => 'int',
'default' => 600, 'default' => 600,
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'session_allow_multiple_login' => array( 'session_allow_multiple_login' => array(
'label' => $lng['serversettings']['session_allow_multiple_login'], 'label' => $lng['serversettings']['session_allow_multiple_login'],
@@ -36,7 +35,7 @@ return array(
'varname' => 'allow_multiple_login', 'varname' => 'allow_multiple_login',
'type' => 'bool', 'type' => 'bool',
'default' => false, 'default' => false,
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'login_domain_login' => array( 'login_domain_login' => array(
'label' => $lng['serversettings']['login_domain_login'], 'label' => $lng['serversettings']['login_domain_login'],
@@ -44,7 +43,7 @@ return array(
'varname' => 'domain_login', 'varname' => 'domain_login',
'type' => 'bool', 'type' => 'bool',
'default' => false, 'default' => false,
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'login_maxloginattempts' => array( 'login_maxloginattempts' => array(
'label' => $lng['serversettings']['maxloginattempts'], 'label' => $lng['serversettings']['maxloginattempts'],
@@ -52,7 +51,7 @@ return array(
'varname' => 'maxloginattempts', 'varname' => 'maxloginattempts',
'type' => 'int', 'type' => 'int',
'default' => 3, 'default' => 3,
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'login_deactivatetime' => array( 'login_deactivatetime' => array(
'label' => $lng['serversettings']['deactivatetime'], 'label' => $lng['serversettings']['deactivatetime'],
@@ -60,7 +59,7 @@ return array(
'varname' => 'deactivatetime', 'varname' => 'deactivatetime',
'type' => 'int', 'type' => 'int',
'default' => 900, 'default' => 900,
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'2fa_enabled' => array( '2fa_enabled' => array(
'label' => $lng['2fa']['2fa_enabled'], 'label' => $lng['2fa']['2fa_enabled'],
@@ -68,7 +67,7 @@ return array(
'varname' => 'enabled', 'varname' => 'enabled',
'type' => 'bool', 'type' => 'bool',
'default' => true, 'default' => true,
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'panel_password_min_length' => array( 'panel_password_min_length' => array(
'label' => $lng['serversettings']['panel_password_min_length'], 'label' => $lng['serversettings']['panel_password_min_length'],
@@ -76,7 +75,7 @@ return array(
'varname' => 'password_min_length', 'varname' => 'password_min_length',
'type' => 'int', 'type' => 'int',
'default' => 0, 'default' => 0,
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'panel_password_alpha_lower' => array( 'panel_password_alpha_lower' => array(
'label' => $lng['serversettings']['panel_password_alpha_lower'], 'label' => $lng['serversettings']['panel_password_alpha_lower'],
@@ -84,7 +83,7 @@ return array(
'varname' => 'password_alpha_lower', 'varname' => 'password_alpha_lower',
'type' => 'bool', 'type' => 'bool',
'default' => true, 'default' => true,
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'panel_password_alpha_upper' => array( 'panel_password_alpha_upper' => array(
'label' => $lng['serversettings']['panel_password_alpha_upper'], 'label' => $lng['serversettings']['panel_password_alpha_upper'],
@@ -92,7 +91,7 @@ return array(
'varname' => 'password_alpha_upper', 'varname' => 'password_alpha_upper',
'type' => 'bool', 'type' => 'bool',
'default' => true, 'default' => true,
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'panel_password_numeric' => array( 'panel_password_numeric' => array(
'label' => $lng['serversettings']['panel_password_numeric'], 'label' => $lng['serversettings']['panel_password_numeric'],
@@ -100,7 +99,7 @@ return array(
'varname' => 'password_numeric', 'varname' => 'password_numeric',
'type' => 'bool', 'type' => 'bool',
'default' => false, 'default' => false,
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'panel_password_special_char_required' => array( 'panel_password_special_char_required' => array(
'label' => $lng['serversettings']['panel_password_special_char_required'], 'label' => $lng['serversettings']['panel_password_special_char_required'],
@@ -108,7 +107,7 @@ return array(
'varname' => 'password_special_char_required', 'varname' => 'password_special_char_required',
'type' => 'bool', 'type' => 'bool',
'default' => false, 'default' => false,
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'panel_password_special_char' => array( 'panel_password_special_char' => array(
'label' => $lng['serversettings']['panel_password_special_char'], 'label' => $lng['serversettings']['panel_password_special_char'],
@@ -116,7 +115,7 @@ return array(
'varname' => 'password_special_char', 'varname' => 'password_special_char',
'type' => 'string', 'type' => 'string',
'default' => '!?<>§$%+#=@', 'default' => '!?<>§$%+#=@',
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'panel_password_regex' => array( 'panel_password_regex' => array(
'label' => $lng['serversettings']['panel_password_regex'], 'label' => $lng['serversettings']['panel_password_regex'],
@@ -124,7 +123,7 @@ return array(
'varname' => 'password_regex', 'varname' => 'password_regex',
'type' => 'string', 'type' => 'string',
'default' => '', 'default' => '',
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'customer_accountprefix' => array( 'customer_accountprefix' => array(
'label' => $lng['serversettings']['accountprefix'], 'label' => $lng['serversettings']['accountprefix'],
@@ -133,8 +132,10 @@ return array(
'type' => 'string', 'type' => 'string',
'default' => '', 'default' => '',
'plausibility_check_method' => array( 'plausibility_check_method' => array(
'\\Froxlor\\Validate\\Check', 'checkUsername'), '\\Froxlor\\Validate\\Check',
'save_method' => 'storeSettingField', 'checkUsername'
),
'save_method' => 'storeSettingField'
), ),
'customer_mysqlprefix' => array( 'customer_mysqlprefix' => array(
'label' => $lng['serversettings']['mysqlprefix'], 'label' => $lng['serversettings']['mysqlprefix'],
@@ -143,8 +144,10 @@ return array(
'type' => 'string', 'type' => 'string',
'default' => '', 'default' => '',
'plausibility_check_method' => array( 'plausibility_check_method' => array(
'\\Froxlor\\Validate\\Check', 'checkUsername'), '\\Froxlor\\Validate\\Check',
'save_method' => 'storeSettingField', 'checkUsername'
),
'save_method' => 'storeSettingField'
), ),
'customer_ftpprefix' => array( 'customer_ftpprefix' => array(
'label' => $lng['serversettings']['ftpprefix'], 'label' => $lng['serversettings']['ftpprefix'],
@@ -152,7 +155,7 @@ return array(
'varname' => 'ftpprefix', 'varname' => 'ftpprefix',
'type' => 'string', 'type' => 'string',
'default' => '', 'default' => '',
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'customer_ftpatdomain' => array( 'customer_ftpatdomain' => array(
'label' => $lng['serversettings']['ftpdomain'], 'label' => $lng['serversettings']['ftpdomain'],
@@ -160,7 +163,7 @@ return array(
'varname' => 'ftpatdomain', 'varname' => 'ftpatdomain',
'type' => 'bool', 'type' => 'bool',
'default' => false, 'default' => false,
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'panel_allow_preset' => array( 'panel_allow_preset' => array(
'label' => $lng['serversettings']['allow_password_reset'], 'label' => $lng['serversettings']['allow_password_reset'],
@@ -173,7 +176,7 @@ return array(
'fieldname' => 'panel_allow_preset_admin', 'fieldname' => 'panel_allow_preset_admin',
'fielddata' => array( 'fielddata' => array(
'settinggroup' => 'panel', 'settinggroup' => 'panel',
'varname' => 'allow_preset_admin', 'varname' => 'allow_preset_admin'
), ),
'onlyif' => 0 'onlyif' => 0
) )
@@ -189,7 +192,7 @@ return array(
'fieldname' => 'panel_allow_preset', 'fieldname' => 'panel_allow_preset',
'fielddata' => array( 'fielddata' => array(
'settinggroup' => 'panel', 'settinggroup' => 'panel',
'varname' => 'allow_preset', 'varname' => 'allow_preset'
), ),
'onlyif' => 1 'onlyif' => 1
) )
@@ -202,9 +205,9 @@ return array(
'default' => false, 'default' => false,
'cronmodule' => 'froxlor/backup', 'cronmodule' => 'froxlor/backup',
'save_method' => 'storeSettingField' 'save_method' => 'storeSettingField'
), )
), )
), )
) )
); );

View File

@@ -14,7 +14,6 @@
* @package Settings * @package Settings
* *
*/ */
return array( return array(
'groups' => array( 'groups' => array(
'crond' => array( 'crond' => array(
@@ -27,7 +26,7 @@ return array(
'type' => 'string', 'type' => 'string',
'string_type' => 'file', 'string_type' => 'file',
'default' => '/etc/cron.d/froxlor', 'default' => '/etc/cron.d/froxlor',
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'system_croncmdline' => array( 'system_croncmdline' => array(
'label' => $lng['serversettings']['system_croncmdline'], 'label' => $lng['serversettings']['system_croncmdline'],
@@ -35,7 +34,7 @@ return array(
'varname' => 'croncmdline', 'varname' => 'croncmdline',
'type' => 'string', 'type' => 'string',
'default' => '/usr/bin/nice -n 5 /usr/bin/php -q', 'default' => '/usr/bin/nice -n 5 /usr/bin/php -q',
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'system_crondreload' => array( 'system_crondreload' => array(
'label' => $lng['serversettings']['system_crondreload'], 'label' => $lng['serversettings']['system_crondreload'],
@@ -43,7 +42,7 @@ return array(
'varname' => 'crondreload', 'varname' => 'crondreload',
'type' => 'string', 'type' => 'string',
'default' => '/etc/init.d/cron reload', 'default' => '/etc/init.d/cron reload',
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'system_cron_allowautoupdate' => array( 'system_cron_allowautoupdate' => array(
'label' => $lng['serversettings']['system_cron_allowautoupdate'], 'label' => $lng['serversettings']['system_cron_allowautoupdate'],
@@ -51,7 +50,7 @@ return array(
'varname' => 'cron_allowautoupdate', 'varname' => 'cron_allowautoupdate',
'type' => 'bool', 'type' => 'bool',
'default' => false, 'default' => false,
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'system_debug_cron' => array( 'system_debug_cron' => array(
'label' => $lng['serversettings']['cron']['debug'], 'label' => $lng['serversettings']['cron']['debug'],
@@ -59,7 +58,7 @@ return array(
'varname' => 'debug_cron', 'varname' => 'debug_cron',
'type' => 'bool', 'type' => 'bool',
'default' => false, 'default' => false,
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
) )
) )
) )

View File

@@ -14,7 +14,6 @@
* @package Settings * @package Settings
* *
*/ */
return array( return array(
'groups' => array( 'groups' => array(
'perl' => array( 'perl' => array(
@@ -27,7 +26,9 @@ return array(
'type' => 'string', 'type' => 'string',
'default' => '/usr/bin/perl', 'default' => '/usr/bin/perl',
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField',
'websrv_avail' => array('lighttpd') 'websrv_avail' => array(
'lighttpd'
)
), ),
'system_perl_suexecworkaround' => array( 'system_perl_suexecworkaround' => array(
'label' => $lng['serversettings']['perl']['suexecworkaround'], 'label' => $lng['serversettings']['perl']['suexecworkaround'],
@@ -36,7 +37,9 @@ return array(
'type' => 'bool', 'type' => 'bool',
'default' => false, 'default' => false,
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField',
'websrv_avail' => array('apache2') 'websrv_avail' => array(
'apache2'
)
), ),
'system_perl_suexeccgipath' => array( 'system_perl_suexeccgipath' => array(
'label' => $lng['serversettings']['perl']['suexeccgipath'], 'label' => $lng['serversettings']['perl']['suexeccgipath'],
@@ -46,7 +49,9 @@ return array(
'string_type' => 'dir', 'string_type' => 'dir',
'default' => '/var/www/cgi-bin/', 'default' => '/var/www/cgi-bin/',
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField',
'websrv_avail' => array('apache2') 'websrv_avail' => array(
'apache2'
)
), ),
'perl_server' => array( 'perl_server' => array(
'label' => $lng['serversettings']['perl_server'], 'label' => $lng['serversettings']['perl_server'],
@@ -55,11 +60,13 @@ return array(
'type' => 'string', 'type' => 'string',
'default' => 'unix:/var/run/nginx/cgiwrap-dispatch.sock', 'default' => 'unix:/var/run/nginx/cgiwrap-dispatch.sock',
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField',
'websrv_avail' => array('nginx') 'websrv_avail' => array(
), 'nginx'
), )
), )
), )
)
)
); );
?> ?>

View File

@@ -16,7 +16,6 @@
* @package Settings * @package Settings
* *
*/ */
return array( return array(
'groups' => array( 'groups' => array(
'statistics' => array( 'statistics' => array(
@@ -29,8 +28,12 @@ return array(
'type' => 'option', 'type' => 'option',
'default' => 2, 'default' => 2,
'option_mode' => 'one', 'option_mode' => 'one',
'option_options' => array(0 => $lng['admin']['webalizer']['normal'], 1 => $lng['admin']['webalizer']['quiet'], 2 => $lng['admin']['webalizer']['veryquiet']), 'option_options' => array(
'save_method' => 'storeSettingField', 0 => $lng['admin']['webalizer']['normal'],
1 => $lng['admin']['webalizer']['quiet'],
2 => $lng['admin']['webalizer']['veryquiet']
),
'save_method' => 'storeSettingField'
), ),
'system_awstats_enabled' => array( 'system_awstats_enabled' => array(
'label' => $lng['serversettings']['awstats_enabled'], 'label' => $lng['serversettings']['awstats_enabled'],
@@ -38,7 +41,7 @@ return array(
'varname' => 'awstats_enabled', 'varname' => 'awstats_enabled',
'type' => 'bool', 'type' => 'bool',
'default' => false, 'default' => false,
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'system_awstats_path' => array( 'system_awstats_path' => array(
'label' => $lng['serversettings']['awstats_path'], 'label' => $lng['serversettings']['awstats_path'],
@@ -47,7 +50,7 @@ return array(
'type' => 'string', 'type' => 'string',
'string_type' => 'dir', 'string_type' => 'dir',
'default' => '/usr/bin/', 'default' => '/usr/bin/',
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'system_awstats_awstatspath' => array( 'system_awstats_awstatspath' => array(
'label' => $lng['serversettings']['awstats_awstatspath'], 'label' => $lng['serversettings']['awstats_awstatspath'],
@@ -56,7 +59,7 @@ return array(
'type' => 'string', 'type' => 'string',
'string_type' => 'dir', 'string_type' => 'dir',
'default' => '/usr/bin/', 'default' => '/usr/bin/',
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'system_awstats_conf' => array( 'system_awstats_conf' => array(
'label' => $lng['serversettings']['awstats_conf'], 'label' => $lng['serversettings']['awstats_conf'],
@@ -65,7 +68,7 @@ return array(
'type' => 'string', 'type' => 'string',
'string_type' => 'dir', 'string_type' => 'dir',
'default' => '/etc/awstats/', 'default' => '/etc/awstats/',
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'system_awstats_icons' => array( 'system_awstats_icons' => array(
'label' => $lng['serversettings']['awstats_icons'], 'label' => $lng['serversettings']['awstats_icons'],
@@ -74,7 +77,7 @@ return array(
'type' => 'string', 'type' => 'string',
'string_type' => 'dir', 'string_type' => 'dir',
'default' => '/usr/share/awstats/icon/', 'default' => '/usr/share/awstats/icon/',
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
) )
) )
) )

View File

@@ -16,7 +16,6 @@
* @package Settings * @package Settings
* *
*/ */
return array( return array(
'groups' => array( 'groups' => array(
'mail' => array( 'mail' => array(
@@ -30,7 +29,7 @@ return array(
'default' => 2000, 'default' => 2000,
'int_min' => 1, 'int_min' => 1,
'int_max' => 65535, 'int_max' => 65535,
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'system_vmail_gid' => array( 'system_vmail_gid' => array(
'label' => $lng['serversettings']['vmail_gid'], 'label' => $lng['serversettings']['vmail_gid'],
@@ -40,7 +39,7 @@ return array(
'default' => 2000, 'default' => 2000,
'int_min' => 1, 'int_min' => 1,
'int_max' => 65535, 'int_max' => 65535,
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'system_vmail_homedir' => array( 'system_vmail_homedir' => array(
'label' => $lng['serversettings']['vmail_homedir'], 'label' => $lng['serversettings']['vmail_homedir'],
@@ -49,7 +48,7 @@ return array(
'type' => 'string', 'type' => 'string',
'string_type' => 'dir', 'string_type' => 'dir',
'default' => '/var/customers/mail/', 'default' => '/var/customers/mail/',
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'system_vmail_maildirname' => array( 'system_vmail_maildirname' => array(
'label' => $lng['serversettings']['vmail_maildirname'], 'label' => $lng['serversettings']['vmail_maildirname'],
@@ -59,7 +58,7 @@ return array(
'string_type' => 'dir', 'string_type' => 'dir',
'default' => 'Maildir', 'default' => 'Maildir',
'string_emptyallowed' => true, 'string_emptyallowed' => true,
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'panel_sendalternativemail' => array( 'panel_sendalternativemail' => array(
'label' => $lng['serversettings']['sendalternativemail'], 'label' => $lng['serversettings']['sendalternativemail'],
@@ -67,7 +66,7 @@ return array(
'varname' => 'sendalternativemail', 'varname' => 'sendalternativemail',
'type' => 'bool', 'type' => 'bool',
'default' => false, 'default' => false,
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'system_mail_quota_enabled' => array( 'system_mail_quota_enabled' => array(
'label' => $lng['serversettings']['mail_quota_enabled'], 'label' => $lng['serversettings']['mail_quota_enabled'],
@@ -75,7 +74,7 @@ return array(
'varname' => 'mail_quota_enabled', 'varname' => 'mail_quota_enabled',
'type' => 'bool', 'type' => 'bool',
'default' => false, 'default' => false,
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'system_mail_quota' => array( 'system_mail_quota' => array(
'label' => $lng['serversettings']['mail_quota'], 'label' => $lng['serversettings']['mail_quota'],
@@ -83,7 +82,7 @@ return array(
'varname' => 'mail_quota', 'varname' => 'mail_quota',
'type' => 'int', 'type' => 'int',
'default' => 100, 'default' => 100,
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'system_catchall_enabled' => array( 'system_catchall_enabled' => array(
'label' => $lng['serversettings']['catchall_enabled'], 'label' => $lng['serversettings']['catchall_enabled'],
@@ -91,7 +90,7 @@ return array(
'varname' => 'catchall_enabled', 'varname' => 'catchall_enabled',
'type' => 'bool', 'type' => 'bool',
'default' => true, 'default' => true,
'save_method' => 'storeSettingResetCatchall', 'save_method' => 'storeSettingResetCatchall'
), ),
'system_mailtraffic_enabled' => array( 'system_mailtraffic_enabled' => array(
'label' => $lng['serversettings']['mailtraffic_enabled'], 'label' => $lng['serversettings']['mailtraffic_enabled'],
@@ -99,7 +98,7 @@ return array(
'varname' => 'mailtraffic_enabled', 'varname' => 'mailtraffic_enabled',
'type' => 'bool', 'type' => 'bool',
'default' => true, 'default' => true,
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'system_mdaserver' => array( 'system_mdaserver' => array(
'label' => $lng['serversettings']['mdaserver'], 'label' => $lng['serversettings']['mdaserver'],
@@ -108,8 +107,11 @@ return array(
'type' => 'option', 'type' => 'option',
'option_mode' => 'one', 'option_mode' => 'one',
'default' => 'dovecot', 'default' => 'dovecot',
'option_options' => array('courier' => 'Courier', 'dovecot' => 'Dovecot'), 'option_options' => array(
'save_method' => 'storeSettingField', 'courier' => 'Courier',
'dovecot' => 'Dovecot'
),
'save_method' => 'storeSettingField'
), ),
'system_mdalog' => array( 'system_mdalog' => array(
'label' => $lng['serversettings']['mdalog'], 'label' => $lng['serversettings']['mdalog'],
@@ -119,7 +121,7 @@ return array(
'string_type' => 'file', 'string_type' => 'file',
'default' => '/var/log/mail.log', 'default' => '/var/log/mail.log',
'string_emptyallowed' => true, 'string_emptyallowed' => true,
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'system_mtaserver' => array( 'system_mtaserver' => array(
'label' => $lng['serversettings']['mtaserver'], 'label' => $lng['serversettings']['mtaserver'],
@@ -128,8 +130,11 @@ return array(
'type' => 'option', 'type' => 'option',
'option_mode' => 'one', 'option_mode' => 'one',
'default' => 'postfix', 'default' => 'postfix',
'option_options' => array('exim4' => 'Exim4', 'postfix' => 'Postfix'), 'option_options' => array(
'save_method' => 'storeSettingField', 'exim4' => 'Exim4',
'postfix' => 'Postfix'
),
'save_method' => 'storeSettingField'
), ),
'system_mtalog' => array( 'system_mtalog' => array(
'label' => $lng['serversettings']['mtalog'], 'label' => $lng['serversettings']['mtalog'],
@@ -139,11 +144,11 @@ return array(
'string_type' => 'file', 'string_type' => 'file',
'default' => '/var/log/mail.log', 'default' => '/var/log/mail.log',
'string_emptyallowed' => true, 'string_emptyallowed' => true,
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), )
), )
), )
), )
); );
?> ?>

View File

@@ -16,7 +16,6 @@
* @package Settings * @package Settings
* *
*/ */
return array( return array(
'groups' => array( 'groups' => array(
'ftpserver' => array( 'ftpserver' => array(
@@ -29,11 +28,14 @@ return array(
'type' => 'option', 'type' => 'option',
'default' => 'proftpd', 'default' => 'proftpd',
'option_mode' => 'one', 'option_mode' => 'one',
'option_options' => array('proftpd' => 'Proftpd', 'pureftpd' => 'Pureftpd'), 'option_options' => array(
'save_method' => 'storeSettingField', 'proftpd' => 'Proftpd',
), 'pureftpd' => 'Pureftpd'
),
), ),
'save_method' => 'storeSettingField'
)
)
)
) )
); );

View File

@@ -16,7 +16,6 @@
* @package Settings * @package Settings
* *
*/ */
return array( return array(
'groups' => array( 'groups' => array(
'nameserver' => array( 'nameserver' => array(
@@ -46,7 +45,10 @@ return array(
'type' => 'option', 'type' => 'option',
'default' => 'bind', 'default' => 'bind',
'option_mode' => 'one', 'option_mode' => 'one',
'option_options' => array('Bind' => 'Bind9', 'PowerDNS' => 'PowerDNS'), 'option_options' => array(
'Bind' => 'Bind9',
'PowerDNS' => 'PowerDNS'
),
'save_method' => 'storeSettingField' 'save_method' => 'storeSettingField'
), ),
'system_bindconf_directory' => array( 'system_bindconf_directory' => array(
@@ -56,7 +58,7 @@ return array(
'type' => 'string', 'type' => 'string',
'string_type' => 'dir', 'string_type' => 'dir',
'default' => '/etc/bind/', 'default' => '/etc/bind/',
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'system_bindreload_command' => array( 'system_bindreload_command' => array(
'label' => $lng['serversettings']['bindreload_command'], 'label' => $lng['serversettings']['bindreload_command'],
@@ -64,7 +66,7 @@ return array(
'varname' => 'bindreload_command', 'varname' => 'bindreload_command',
'type' => 'string', 'type' => 'string',
'default' => '/etc/init.d/bind9 reload', 'default' => '/etc/init.d/bind9 reload',
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'system_nameservers' => array( 'system_nameservers' => array(
'label' => $lng['serversettings']['nameservers'], 'label' => $lng['serversettings']['nameservers'],
@@ -74,7 +76,7 @@ return array(
'string_regexp' => '/^(([a-z0-9\-\._]+, ?)*[a-z0-9\-\._]+)?$/i', 'string_regexp' => '/^(([a-z0-9\-\._]+, ?)*[a-z0-9\-\._]+)?$/i',
'string_emptyallowed' => true, 'string_emptyallowed' => true,
'default' => '', 'default' => '',
'save_method' => 'storeSettingFieldInsertBindTask', 'save_method' => 'storeSettingFieldInsertBindTask'
), ),
'system_mxservers' => array( 'system_mxservers' => array(
'label' => $lng['serversettings']['mxservers'], 'label' => $lng['serversettings']['mxservers'],
@@ -84,7 +86,7 @@ return array(
'string_regexp' => '/^(([0-9]+ [a-z0-9\-\._]+, ?)*[0-9]+ [a-z0-9\-\._]+)?$/i', 'string_regexp' => '/^(([0-9]+ [a-z0-9\-\._]+, ?)*[0-9]+ [a-z0-9\-\._]+)?$/i',
'string_emptyallowed' => true, 'string_emptyallowed' => true,
'default' => '', 'default' => '',
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'system_axfrservers' => array( 'system_axfrservers' => array(
'label' => $lng['serversettings']['axfrservers'], 'label' => $lng['serversettings']['axfrservers'],
@@ -95,7 +97,7 @@ return array(
'string_delimiter' => ',', 'string_delimiter' => ',',
'string_emptyallowed' => true, 'string_emptyallowed' => true,
'default' => '', 'default' => '',
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'system_dns_createmailentry' => array( 'system_dns_createmailentry' => array(
'label' => $lng['serversettings']['mail_also_with_mxservers'], 'label' => $lng['serversettings']['mail_also_with_mxservers'],
@@ -113,9 +115,9 @@ return array(
'default' => 604800, /* 1 week */ 'default' => 604800, /* 1 week */
'int_min' => 3600, /* 1 hour */ 'int_min' => 3600, /* 1 hour */
'int_max' => 2147483647, /* integer max */ 'int_max' => 2147483647, /* integer max */
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), )
), )
), )
), )
); );

View File

@@ -16,7 +16,6 @@
* @package Settings * @package Settings
* *
*/ */
return array( return array(
'groups' => array( 'groups' => array(
'logging' => array( 'logging' => array(
@@ -38,8 +37,11 @@ return array(
'type' => 'option', 'type' => 'option',
'default' => 1, 'default' => 1,
'option_mode' => 'one', 'option_mode' => 'one',
'option_options' => array(1 => $lng['admin']['logger']['normal'], 2 => $lng['admin']['logger']['paranoid']), 'option_options' => array(
'save_method' => 'storeSettingField', 1 => $lng['admin']['logger']['normal'],
2 => $lng['admin']['logger']['paranoid']
),
'save_method' => 'storeSettingField'
), ),
'logger_logtypes' => array( 'logger_logtypes' => array(
'label' => $lng['serversettings']['logger']['types'], 'label' => $lng['serversettings']['logger']['types'],
@@ -48,8 +50,12 @@ return array(
'type' => 'option', 'type' => 'option',
'default' => 'syslog,mysql', 'default' => 'syslog,mysql',
'option_mode' => 'multiple', 'option_mode' => 'multiple',
'option_options' => array('syslog' => 'syslog', 'file' => 'file', 'mysql' => 'mysql'), 'option_options' => array(
'save_method' => 'storeSettingField', 'syslog' => 'syslog',
'file' => 'file',
'mysql' => 'mysql'
),
'save_method' => 'storeSettingField'
), ),
'logger_logfile' => array( 'logger_logfile' => array(
'label' => $lng['serversettings']['logger']['logfile'], 'label' => $lng['serversettings']['logger']['logfile'],
@@ -59,7 +65,7 @@ return array(
'string_type' => 'file', 'string_type' => 'file',
'string_emptyallowed' => true, 'string_emptyallowed' => true,
'default' => '', 'default' => '',
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'logger_log_cron' => array( 'logger_log_cron' => array(
'label' => $lng['serversettings']['logger']['logcron'], 'label' => $lng['serversettings']['logger']['logcron'],
@@ -73,10 +79,10 @@ return array(
1 => $lng['serversettings']['logger']['logcronoption']['once'], 1 => $lng['serversettings']['logger']['logcronoption']['once'],
2 => $lng['serversettings']['logger']['logcronoption']['always'] 2 => $lng['serversettings']['logger']['logcronoption']['always']
), ),
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), )
), )
), )
) )
); );

View File

@@ -16,7 +16,6 @@
* @package \Froxlor\Settings * @package \Froxlor\Settings
* *
*/ */
return array( return array(
'groups' => array( 'groups' => array(
'dkim' => array( 'dkim' => array(
@@ -38,7 +37,7 @@ return array(
'type' => 'string', 'type' => 'string',
'string_type' => 'dir', 'string_type' => 'dir',
'default' => '/etc/postfix/dkim/', 'default' => '/etc/postfix/dkim/',
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'dkim_domains' => array( 'dkim_domains' => array(
'label' => $lng['dkim']['dkim_domains'], 'label' => $lng['dkim']['dkim_domains'],
@@ -47,7 +46,7 @@ return array(
'type' => 'string', 'type' => 'string',
'string_regexp' => '/^[a-z0-9\._]+$/i', 'string_regexp' => '/^[a-z0-9\._]+$/i',
'default' => 'domains', 'default' => 'domains',
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'dkim_dkimkeys' => array( 'dkim_dkimkeys' => array(
'label' => $lng['dkim']['dkim_dkimkeys'], 'label' => $lng['dkim']['dkim_dkimkeys'],
@@ -56,7 +55,7 @@ return array(
'type' => 'string', 'type' => 'string',
'string_regexp' => '/^[a-z0-9\._]+$/i', 'string_regexp' => '/^[a-z0-9\._]+$/i',
'default' => 'dkim-keys.conf', 'default' => 'dkim-keys.conf',
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'dkim_algorithm' => array( 'dkim_algorithm' => array(
'label' => $lng['dkim']['dkim_algorithm'], 'label' => $lng['dkim']['dkim_algorithm'],
@@ -65,8 +64,12 @@ return array(
'type' => 'option', 'type' => 'option',
'default' => 'all', 'default' => 'all',
'option_mode' => 'multiple', 'option_mode' => 'multiple',
'option_options' => array('all' => 'All', 'sha1' => 'SHA1', 'sha256' => 'SHA256'), 'option_options' => array(
'save_method' => 'storeSettingFieldInsertBindTask', 'all' => 'All',
'sha1' => 'SHA1',
'sha256' => 'SHA256'
),
'save_method' => 'storeSettingFieldInsertBindTask'
), ),
'dkim_servicetype' => array( 'dkim_servicetype' => array(
'label' => $lng['dkim']['dkim_servicetype'], 'label' => $lng['dkim']['dkim_servicetype'],
@@ -75,8 +78,11 @@ return array(
'type' => 'option', 'type' => 'option',
'default' => '0', 'default' => '0',
'option_mode' => 'one', 'option_mode' => 'one',
'option_options' => array('0' => 'All', '1' => 'E-Mail'), 'option_options' => array(
'save_method' => 'storeSettingFieldInsertBindTask', '0' => 'All',
'1' => 'E-Mail'
),
'save_method' => 'storeSettingFieldInsertBindTask'
), ),
'dkim_keylength' => array( 'dkim_keylength' => array(
'label' => array( 'label' => array(
@@ -88,8 +94,11 @@ return array(
'type' => 'option', 'type' => 'option',
'default' => '1024', 'default' => '1024',
'option_mode' => 'one', 'option_mode' => 'one',
'option_options' => array('1024' => '1024 Bit', '2048' => '2048 Bit'), 'option_options' => array(
'save_method' => 'storeSettingFieldInsertBindTask', '1024' => '1024 Bit',
'2048' => '2048 Bit'
),
'save_method' => 'storeSettingFieldInsertBindTask'
), ),
'dkim_notes' => array( 'dkim_notes' => array(
'label' => $lng['dkim']['dkim_notes'], 'label' => $lng['dkim']['dkim_notes'],
@@ -98,7 +107,7 @@ return array(
'type' => 'string', 'type' => 'string',
'string_regexp' => '/^[a-z0-9\._]+$/i', 'string_regexp' => '/^[a-z0-9\._]+$/i',
'default' => '', 'default' => '',
'save_method' => 'storeSettingFieldInsertBindTask', 'save_method' => 'storeSettingFieldInsertBindTask'
), ),
'dkim_add_adsp' => array( 'dkim_add_adsp' => array(
'label' => $lng['dkim']['dkim_add_adsp'], 'label' => $lng['dkim']['dkim_add_adsp'],
@@ -106,7 +115,7 @@ return array(
'varname' => 'dkim_add_adsp', 'varname' => 'dkim_add_adsp',
'type' => 'bool', 'type' => 'bool',
'default' => true, 'default' => true,
'save_method' => 'storeSettingFieldInsertBindTask', 'save_method' => 'storeSettingFieldInsertBindTask'
), ),
'dkim_add_adsppolicy' => array( 'dkim_add_adsppolicy' => array(
'label' => $lng['dkim']['dkim_add_adsppolicy'], 'label' => $lng['dkim']['dkim_add_adsppolicy'],
@@ -115,8 +124,12 @@ return array(
'type' => 'option', 'type' => 'option',
'default' => '1', 'default' => '1',
'option_mode' => 'one', 'option_mode' => 'one',
'option_options' => array('0' => 'Unknown', '1' => 'All', '2' => 'Discardable'), 'option_options' => array(
'save_method' => 'storeSettingFieldInsertBindTask', '0' => 'Unknown',
'1' => 'All',
'2' => 'Discardable'
),
'save_method' => 'storeSettingFieldInsertBindTask'
), ),
'dkimrestart_command' => array( 'dkimrestart_command' => array(
'label' => $lng['dkim']['dkimrestart_command'], 'label' => $lng['dkim']['dkimrestart_command'],
@@ -124,11 +137,11 @@ return array(
'varname' => 'dkimrestart_command', 'varname' => 'dkimrestart_command',
'type' => 'string', 'type' => 'string',
'default' => '/etc/init.d/dkim-filter restart', 'default' => '/etc/init.d/dkim-filter restart',
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), )
), )
), )
), )
); );
?> ?>

View File

@@ -14,7 +14,6 @@
* @package Settings * @package Settings
* *
*/ */
return array( return array(
'groups' => array( 'groups' => array(
'spf' => array( 'spf' => array(

View File

@@ -16,7 +16,6 @@
* @package Settings * @package Settings
* *
*/ */
return array( return array(
'groups' => array( 'groups' => array(
'security' => array( 'security' => array(
@@ -28,7 +27,7 @@ return array(
'varname' => 'unix_names', 'varname' => 'unix_names',
'type' => 'bool', 'type' => 'bool',
'default' => true, 'default' => true,
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'system_mailpwcleartext' => array( 'system_mailpwcleartext' => array(
'label' => $lng['serversettings']['mailpwcleartext'], 'label' => $lng['serversettings']['mailpwcleartext'],
@@ -36,7 +35,7 @@ return array(
'varname' => 'mailpwcleartext', 'varname' => 'mailpwcleartext',
'type' => 'bool', 'type' => 'bool',
'default' => false, 'default' => false,
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'system_passwordcryptfunc' => array( 'system_passwordcryptfunc' => array(
'label' => $lng['serversettings']['passwordcryptfunc'], 'label' => $lng['serversettings']['passwordcryptfunc'],
@@ -45,8 +44,11 @@ return array(
'type' => 'option', 'type' => 'option',
'default' => 0, 'default' => 0,
'option_mode' => 'one', 'option_mode' => 'one',
'option_options_method' => array('\\Froxlor\\System\\Crypt', 'getAvailablePasswordHashes'), 'option_options_method' => array(
'save_method' => 'storeSettingField', '\\Froxlor\\System\\Crypt',
'getAvailablePasswordHashes'
),
'save_method' => 'storeSettingField'
), ),
'system_allow_error_report_admin' => array( 'system_allow_error_report_admin' => array(
'label' => $lng['serversettings']['allow_error_report_admin'], 'label' => $lng['serversettings']['allow_error_report_admin'],
@@ -54,7 +56,7 @@ return array(
'varname' => 'allow_error_report_admin', 'varname' => 'allow_error_report_admin',
'type' => 'bool', 'type' => 'bool',
'default' => false, 'default' => false,
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'system_allow_error_report_customer' => array( 'system_allow_error_report_customer' => array(
'label' => $lng['serversettings']['allow_error_report_customer'], 'label' => $lng['serversettings']['allow_error_report_customer'],
@@ -62,7 +64,7 @@ return array(
'varname' => 'allow_error_report_customer', 'varname' => 'allow_error_report_customer',
'type' => 'bool', 'type' => 'bool',
'default' => false, 'default' => false,
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'system_allow_customer_shell' => array( 'system_allow_customer_shell' => array(
'label' => $lng['serversettings']['allow_allow_customer_shell'], 'label' => $lng['serversettings']['allow_allow_customer_shell'],
@@ -70,7 +72,7 @@ return array(
'varname' => 'allow_customer_shell', 'varname' => 'allow_customer_shell',
'type' => 'bool', 'type' => 'bool',
'default' => false, 'default' => false,
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'system_available_shells' => array( 'system_available_shells' => array(
'label' => $lng['serversettings']['available_shells'], 'label' => $lng['serversettings']['available_shells'],
@@ -79,7 +81,7 @@ return array(
'type' => 'string', 'type' => 'string',
'string_emptyallowed' => true, 'string_emptyallowed' => true,
'default' => '', 'default' => '',
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
) )
) )
) )

View File

@@ -13,7 +13,6 @@
* @package Settings * @package Settings
* *
*/ */
return array( return array(
'groups' => array( 'groups' => array(
'diskquota' => array( 'diskquota' => array(
@@ -34,7 +33,7 @@ return array(
'varname' => 'diskquota_repquota_path', 'varname' => 'diskquota_repquota_path',
'type' => 'string', 'type' => 'string',
'default' => '/usr/sbin/repquota', 'default' => '/usr/sbin/repquota',
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'diskquota_quotatool_path' => array( 'diskquota_quotatool_path' => array(
'label' => $lng['serversettings']['diskquota_quotatool_path']['description'], 'label' => $lng['serversettings']['diskquota_quotatool_path']['description'],
@@ -42,7 +41,7 @@ return array(
'varname' => 'diskquota_quotatool_path', 'varname' => 'diskquota_quotatool_path',
'type' => 'string', 'type' => 'string',
'default' => '/usr/bin/quotatool', 'default' => '/usr/bin/quotatool',
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), ),
'diskquota_customer_partition' => array( 'diskquota_customer_partition' => array(
'label' => $lng['serversettings']['diskquota_customer_partition']['description'], 'label' => $lng['serversettings']['diskquota_customer_partition']['description'],
@@ -50,11 +49,11 @@ return array(
'varname' => 'diskquota_customer_partition', 'varname' => 'diskquota_customer_partition',
'type' => 'string', 'type' => 'string',
'default' => '/dev/root', 'default' => '/dev/root',
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField'
), )
), )
), )
), )
); );
?> ?>

View File

@@ -1,55 +1,50 @@
<?php <?php
/* /*
+----------------------------------------------------------------------+ * +----------------------------------------------------------------------+
| APC | * | APC |
+----------------------------------------------------------------------+ * +----------------------------------------------------------------------+
| Copyright (c) 2006-2011 The PHP Group | * | Copyright (c) 2006-2011 The PHP Group |
+----------------------------------------------------------------------+ * +----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, | * | This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is | * | that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: | * | available through the world-wide-web at the following url: |
| http://www.php.net/license/3_01.txt | * | http://www.php.net/license/3_01.txt |
| If you did not receive a copy of the PHP license and are unable to | * | If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to | * | obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. | * | license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+ * +----------------------------------------------------------------------+
| Authors: Ralf Becker <beckerr@php.net> | * | Authors: Ralf Becker <beckerr@php.net> |
| Rasmus Lerdorf <rasmus@php.net> | * | Rasmus Lerdorf <rasmus@php.net> |
| Ilia Alshanetsky <ilia@prohost.org> | * | Ilia Alshanetsky <ilia@prohost.org> |
+----------------------------------------------------------------------+ * +----------------------------------------------------------------------+
*
All other licensing and usage conditions are those of the PHP Group. * All other licensing and usage conditions are those of the PHP Group.
*
Based on https://github.com/krakjoe/apcu/blob/master/apc.php * Based on https://github.com/krakjoe/apcu/blob/master/apc.php
Implemented into Froxlor: Janos Muzsi <muzsij@hypernics.hu> * Implemented into Froxlor: Janos Muzsi <muzsij@hypernics.hu>
*
*/ */
define('AREA', 'admin'); define('AREA', 'admin');
require './lib/init.php'; require './lib/init.php';
$horizontal_bar_size = 950; // 1280px window width $horizontal_bar_size = 950; // 1280px window width
if ($action == 'delete' && if ($action == 'delete' && function_exists('apcu_clear_cache') && $userinfo['change_serversettings'] == '1') {
function_exists('apcu_clear_cache') &&
$userinfo['change_serversettings'] == '1'
) {
apcu_clear_cache(); apcu_clear_cache();
$log->logAction(ADM_ACTION, LOG_INFO, "cleared APCu cache"); $log->logAction(ADM_ACTION, LOG_INFO, "cleared APCu cache");
header('Location: ' . $linker->getLink(array('section' => 'apcuinfo', 'page' => 'showinfo'))); header('Location: ' . $linker->getLink(array(
'section' => 'apcuinfo',
'page' => 'showinfo'
)));
exit(); exit();
} }
if (!function_exists('apcu_cache_info') || if (! function_exists('apcu_cache_info') || ! function_exists('apcu_sma_info')) {
!function_exists('apcu_sma_info')
) {
\Froxlor\UI\Response::standard_error($lng['error']['no_apcuinfo']); \Froxlor\UI\Response::standard_error($lng['error']['no_apcuinfo']);
} }
if ($page == 'showinfo' if ($page == 'showinfo') {
) {
$cache = apcu_cache_info(); $cache = apcu_cache_info();
$mem = apcu_sma_info(); $mem = apcu_sma_info();
$time = time(); $time = time();
@@ -123,18 +118,28 @@ if ($page == 'showinfo'
$img_src2 = ''; $img_src2 = '';
$img_src3 = ''; $img_src3 = '';
if (graphics_avail()) { if (graphics_avail()) {
$img_src = $linker->getLink(array('section' => 'apcuinfo', 'page' => 'img1', 'action' => mt_rand(0, 1000000))); $img_src = $linker->getLink(array(
'section' => 'apcuinfo',
'page' => 'img1',
'action' => mt_rand(0, 1000000)
));
eval("\$img_src1=\"" . \Froxlor\UI\Template::getTemplate("settings/apcuinfo/img_line") . "\";"); eval("\$img_src1=\"" . \Froxlor\UI\Template::getTemplate("settings/apcuinfo/img_line") . "\";");
$img_src = $linker->getLink(array('section' => 'apcuinfo', 'page' => 'img2', 'action' => mt_rand(0, 1000000))); $img_src = $linker->getLink(array(
'section' => 'apcuinfo',
'page' => 'img2',
'action' => mt_rand(0, 1000000)
));
eval("\$img_src2=\"" . \Froxlor\UI\Template::getTemplate("settings/apcuinfo/img_line") . "\";"); eval("\$img_src2=\"" . \Froxlor\UI\Template::getTemplate("settings/apcuinfo/img_line") . "\";");
$img_src = $linker->getLink(array('section' => 'apcuinfo', 'page' => 'img3', 'action' => mt_rand(0, 1000000))); $img_src = $linker->getLink(array(
'section' => 'apcuinfo',
'page' => 'img3',
'action' => mt_rand(0, 1000000)
));
eval("\$img_src3=\"" . \Froxlor\UI\Template::getTemplate("settings/apcuinfo/img_line") . "\";"); eval("\$img_src3=\"" . \Froxlor\UI\Template::getTemplate("settings/apcuinfo/img_line") . "\";");
} }
eval("echo \"" . \Froxlor\UI\Template::getTemplate("settings/apcuinfo/showinfo") . "\";"); eval("echo \"" . \Froxlor\UI\Template::getTemplate("settings/apcuinfo/showinfo") . "\";");
} elseif ($page == 'img1') {
} elseif ($page == 'img1'
) {
$mem = apcu_sma_info(); $mem = apcu_sma_info();
@@ -169,7 +174,10 @@ if ($page == 'showinfo'
if (($angle_to * 360) - ($angle_from * 360) >= 1) { if (($angle_to * 360) - ($angle_from * 360) >= 1) {
fill_arc($image, $x, $y, $size, $angle_from * 360, $angle_to * 360, $col_black, $col_red); fill_arc($image, $x, $y, $size, $angle_from * 360, $angle_to * 360, $col_black, $col_red);
if (($angle_to - $angle_from) > 0.05) { if (($angle_to - $angle_from) > 0.05) {
array_push($string_placement, array($angle_from, $angle_to)); array_push($string_placement, array(
$angle_from,
$angle_to
));
} }
} }
$angle_from = $angle_to; $angle_from = $angle_to;
@@ -180,7 +188,10 @@ if ($page == 'showinfo'
if (($angle_to * 360) - ($angle_from * 360) >= 1) { if (($angle_to * 360) - ($angle_from * 360) >= 1) {
fill_arc($image, $x, $y, $size, $angle_from * 360, $angle_to * 360, $col_black, $col_green); fill_arc($image, $x, $y, $size, $angle_from * 360, $angle_to * 360, $col_black, $col_green);
if (($angle_to - $angle_from) > 0.05) { if (($angle_to - $angle_from) > 0.05) {
array_push($string_placement, array($angle_from, $angle_to)); array_push($string_placement, array(
$angle_from,
$angle_to
));
} }
} }
$angle_from = $angle_to; $angle_from = $angle_to;
@@ -192,7 +203,10 @@ if ($page == 'showinfo'
$angle_to = 1; $angle_to = 1;
fill_arc($image, $x, $y, $size, $angle_from * 360, $angle_to * 360, $col_black, $col_red); fill_arc($image, $x, $y, $size, $angle_from * 360, $angle_to * 360, $col_black, $col_red);
if (($angle_to - $angle_from) > 0.05) { if (($angle_to - $angle_from) > 0.05) {
array_push($string_placement, array($angle_from, $angle_to)); array_push($string_placement, array(
$angle_from,
$angle_to
));
} }
} }
} }
@@ -202,9 +216,8 @@ if ($page == 'showinfo'
header("Content-type: image/png"); header("Content-type: image/png");
imagepng($image); imagepng($image);
exit; exit();
} elseif ($page == 'img2' } elseif ($page == 'img2') {
) {
$cache = apcu_cache_info(); $cache = apcu_cache_info();
@@ -221,14 +234,15 @@ if ($page == 'showinfo'
$s = $cache['num_hits'] + $cache['num_misses']; $s = $cache['num_hits'] + $cache['num_misses'];
$a = $cache['num_hits']; $a = $cache['num_hits'];
fill_box($image, 1, 10, $s ? ($a * ($size - 21) / $s) : $size, 50, $col_black, $col_green/* , sprintf("%.1f%%", $s ? $cache['num_hits'] * 100 / $s : 0) */); fill_box($image, 1, 10, $s ? ($a * ($size - 21) / $s) : $size, 50, $col_black, $col_green /* , sprintf("%.1f%%", $s ? $cache['num_hits'] * 100 / $s : 0) */
fill_box($image, 1, 80, $s ? max(4, ($s - $a) * ($size - 21) / $s) : $size, 50, $col_black, $col_red/* , sprintf("%.1f%%", $s ? $cache['num_misses'] * 100 / $s : 0) */); );
fill_box($image, 1, 80, $s ? max(4, ($s - $a) * ($size - 21) / $s) : $size, 50, $col_black, $col_red /* , sprintf("%.1f%%", $s ? $cache['num_misses'] * 100 / $s : 0) */
);
header("Content-type: image/png"); header("Content-type: image/png");
imagepng($image); imagepng($image);
exit; exit();
} elseif ($page == 'img3' } elseif ($page == 'img3') {
) {
$mem = apcu_sma_info(); $mem = apcu_sma_info();
@@ -278,17 +292,24 @@ if ($page == 'showinfo'
header("Content-type: image/png"); header("Content-type: image/png");
imagepng($image); imagepng($image);
exit; exit();
} }
function graphics_avail() { function graphics_avail()
{
return extension_loaded('gd'); return extension_loaded('gd');
} }
// pretty printer for byte values // pretty printer for byte values
// //
function bsize($s) { function bsize($s)
foreach (array('', 'K', 'M', 'G') as $i => $k) { {
foreach (array(
'',
'K',
'M',
'G'
) as $i => $k) {
if ($s < 1024) if ($s < 1024)
break; break;
$s /= 1024; $s /= 1024;
@@ -296,7 +317,8 @@ function bsize($s) {
return sprintf("%5.1f %sBytes", $s, $k); return sprintf("%5.1f %sBytes", $s, $k);
} }
function duration($ts) { function duration($ts)
{
global $time; global $time;
$years = (int) ((($time - $ts) / (7 * 86400)) / 52.177457); $years = (int) ((($time - $ts) / (7 * 86400)) / 52.177457);
$rem = (int) (($time - $ts) - ($years * 52.177457 * 7 * 86400)); $rem = (int) (($time - $ts) - ($years * 52.177457 * 7 * 86400));
@@ -328,7 +350,8 @@ function duration($ts) {
return $str; return $str;
} }
function block_sort($array1, $array2) { function block_sort($array1, $array2)
{
if ($array1['offset'] > $array2['offset']) { if ($array1['offset'] > $array2['offset']) {
return 1; return 1;
} else { } else {
@@ -336,11 +359,11 @@ function block_sort($array1, $array2) {
} }
} }
function fill_arc($im, $centerX, $centerY, $diameter, $start, $end, $color1, $color2, $text = '', $placeindex = 0) { function fill_arc($im, $centerX, $centerY, $diameter, $start, $end, $color1, $color2, $text = '', $placeindex = 0)
{
$r = $diameter / 2; $r = $diameter / 2;
$w = deg2rad((360 + $start + ($end - $start) / 2) % 360); $w = deg2rad((360 + $start + ($end - $start) / 2) % 360);
if (function_exists("imagefilledarc")) { if (function_exists("imagefilledarc")) {
// exists only if GD 2.0.1 is available // exists only if GD 2.0.1 is available
imagefilledarc($im, $centerX + 1, $centerY + 1, $diameter, $diameter, $start, $end, $color1, IMG_ARC_PIE); imagefilledarc($im, $centerX + 1, $centerY + 1, $diameter, $diameter, $start, $end, $color1, IMG_ARC_PIE);
@@ -364,7 +387,8 @@ function fill_arc($im, $centerX, $centerY, $diameter, $start, $end, $color1, $co
} }
} }
function text_arc($im, $centerX, $centerY, $diameter, $start, $end, $color1, $text, $placeindex = 0) { function text_arc($im, $centerX, $centerY, $diameter, $start, $end, $color1, $text, $placeindex = 0)
{
$r = $diameter / 2; $r = $diameter / 2;
$w = deg2rad((360 + $start + ($end - $start) / 2) % 360); $w = deg2rad((360 + $start + ($end - $start) / 2) % 360);
@@ -376,7 +400,8 @@ function text_arc($im, $centerX, $centerY, $diameter, $start, $end, $color1, $te
} }
} }
function fill_box($im, $x, $y, $w, $h, $color1, $color2, $text = '', $placeindex = '') { function fill_box($im, $x, $y, $w, $h, $color1, $color2, $text = '', $placeindex = '')
{
global $col_black; global $col_black;
$x1 = $x + $w - 1; $x1 = $x + $w - 1;
$y1 = $y + $h - 1; $y1 = $y + $h - 1;

View File

@@ -20,7 +20,7 @@
define('AREA', 'admin'); define('AREA', 'admin');
require './lib/init.php'; require './lib/init.php';
use \Froxlor\Http\HttpClient; use Froxlor\Http\HttpClient;
// define update-uri // define update-uri
define('UPDATE_URI', "https://version.froxlor.org/Froxlor/api/" . $version); define('UPDATE_URI', "https://version.froxlor.org/Froxlor/api/" . $version);
@@ -202,8 +202,7 @@ elseif ($page == 'extract') {
$hiddenparams = ''; $hiddenparams = '';
$yesfile = $filename . '?s=' . $s . '&amp;page=extract&amp;archive=' . $toExtract; $yesfile = $filename . '?s=' . $s . '&amp;page=extract&amp;archive=' . $toExtract;
eval("echo \"" . \Froxlor\UI\Template::getTemplate("misc/question_yesno", true) . "\";"); eval("echo \"" . \Froxlor\UI\Template::getTemplate("misc/question_yesno", true) . "\";");
} } // display error
// display error
elseif ($page == 'error') { elseif ($page == 'error') {
// retrieve error-number via url-parameter // retrieve error-number via url-parameter

View File

@@ -22,8 +22,7 @@ use Froxlor\Settings;
if ($userinfo['change_serversettings'] == '1') { if ($userinfo['change_serversettings'] == '1') {
if ($action == 'setconfigured') if ($action == 'setconfigured') {
{
Settings::Set('panel.is_configured', '1', true); Settings::Set('panel.is_configured', '1', true);
\Froxlor\UI\Response::redirectTo('admin_configfiles.php', array( \Froxlor\UI\Response::redirectTo('admin_configfiles.php', array(
's' => $s 's' => $s
@@ -31,12 +30,9 @@ if ($userinfo['change_serversettings'] == '1') {
} }
$customer_tmpdir = '/tmp/'; $customer_tmpdir = '/tmp/';
if (Settings::Get('system.mod_fcgid') == '1' && Settings::Get('system.mod_fcgid_tmpdir') != '') if (Settings::Get('system.mod_fcgid') == '1' && Settings::Get('system.mod_fcgid_tmpdir') != '') {
{
$customer_tmpdir = Settings::Get('system.mod_fcgid_tmpdir'); $customer_tmpdir = Settings::Get('system.mod_fcgid_tmpdir');
} } elseif (Settings::Get('phpfpm.enabled') == '1' && Settings::Get('phpfpm.tmpdir') != '') {
elseif (Settings::Get('phpfpm.enabled') == '1' && Settings::Get('phpfpm.tmpdir') != '')
{
$customer_tmpdir = Settings::Get('phpfpm.tmpdir'); $customer_tmpdir = Settings::Get('phpfpm.tmpdir');
} }
@@ -95,7 +91,7 @@ if ($userinfo['change_serversettings'] == '1') {
if (! file_exists($config_dir . '/' . $distribution . ".xml")) { if (! file_exists($config_dir . '/' . $distribution . ".xml")) {
trigger_error("Unknown distribution, are you playing around with the URL?"); trigger_error("Unknown distribution, are you playing around with the URL?");
exit; exit();
} }
// create configparser object // create configparser object
@@ -111,7 +107,7 @@ if ($userinfo['change_serversettings'] == '1') {
if (! isset($services[$service])) { if (! isset($services[$service])) {
trigger_error("Unknown service, are you playing around with the URL?"); trigger_error("Unknown service, are you playing around with the URL?");
exit; exit();
} }
$daemons = $services[$service]->getDaemons(); $daemons = $services[$service]->getDaemons();
@@ -159,7 +155,7 @@ if ($userinfo['change_serversettings'] == '1') {
if (! isset($daemons[$daemon])) { if (! isset($daemons[$daemon])) {
trigger_error("Unknown daemon, are you playing around with the URL?"); trigger_error("Unknown daemon, are you playing around with the URL?");
exit; exit();
} }
$confarr = $daemons[$daemon]->getConfig(); $confarr = $daemons[$daemon]->getConfig();

View File

@@ -16,15 +16,12 @@
* @package Panel * @package Panel
* *
*/ */
define('AREA', 'admin'); define('AREA', 'admin');
require './lib/init.php'; require './lib/init.php';
use Froxlor\Database\Database; use Froxlor\Database\Database;
if ($page == 'log' if ($page == 'log' && $userinfo['change_serversettings'] == '1') {
&& $userinfo['change_serversettings'] == '1'
) {
if ($action == '') { if ($action == '') {
$fields = array( $fields = array(
'date' => $lng['logger']['date'], 'date' => $lng['logger']['date'],
@@ -46,17 +43,13 @@ if ($page == 'log'
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) { while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
if (!isset($clog[$row['action']]) if (! isset($clog[$row['action']]) || ! is_array($clog[$row['action']])) {
|| !is_array($clog[$row['action']])
) {
$clog[$row['action']] = array(); $clog[$row['action']] = array();
} }
$clog[$row['action']][$row['logid']] = $row; $clog[$row['action']][$row['logid']] = $row;
} }
if ($paging->sortfield == 'date' if ($paging->sortfield == 'date' && $paging->sortorder == 'desc') {
&& $paging->sortorder == 'desc'
) {
krsort($clog); krsort($clog);
} else { } else {
ksort($clog); ksort($clog);
@@ -114,21 +107,25 @@ if ($page == 'log'
} }
eval("echo \"" . \Froxlor\UI\Template::getTemplate('logger/logger') . "\";"); eval("echo \"" . \Froxlor\UI\Template::getTemplate('logger/logger') . "\";");
} elseif ($action == 'truncate') { } elseif ($action == 'truncate') {
if (isset($_POST['send']) if (isset($_POST['send']) && $_POST['send'] == 'send') {
&& $_POST['send'] == 'send'
) {
$truncatedate = time() - (60 * 10); $truncatedate = time() - (60 * 10);
$trunc_stmt = Database::prepare(" $trunc_stmt = Database::prepare("
DELETE FROM `" . TABLE_PANEL_LOG . "` WHERE `date` < :trunc" DELETE FROM `" . TABLE_PANEL_LOG . "` WHERE `date` < :trunc");
); Database::pexecute($trunc_stmt, array(
Database::pexecute($trunc_stmt, array('trunc' => $truncatedate)); 'trunc' => $truncatedate
));
$log->logAction(ADM_ACTION, LOG_WARNING, 'truncated the system-log (mysql)'); $log->logAction(ADM_ACTION, LOG_WARNING, 'truncated the system-log (mysql)');
\Froxlor\UI\Response::redirectTo($filename, array('page' => $page, 's' => $s)); \Froxlor\UI\Response::redirectTo($filename, array(
'page' => $page,
's' => $s
));
} else { } else {
ask_yesno('logger_reallytruncate', $filename, array('page' => $page, 'action' => $action), TABLE_PANEL_LOG); ask_yesno('logger_reallytruncate', $filename, array(
'page' => $page,
'action' => $action
), TABLE_PANEL_LOG);
} }
} }
} }

View File

@@ -16,7 +16,6 @@
* @package Panel * @package Panel
* *
*/ */
define('AREA', 'admin'); define('AREA', 'admin');
require './lib/init.php'; require './lib/init.php';
@@ -32,12 +31,8 @@ if ($page == 'message') {
if ($action == '') { if ($action == '') {
$log->logAction(ADM_ACTION, LOG_NOTICE, 'viewed panel_message'); $log->logAction(ADM_ACTION, LOG_NOTICE, 'viewed panel_message');
if (isset($_POST['send']) if (isset($_POST['send']) && $_POST['send'] == 'send') {
&& $_POST['send'] == 'send' if ($_POST['receipient'] == 0 && $userinfo['customers_see_all'] == '1') {
) {
if ($_POST['receipient'] == 0
&& $userinfo['customers_see_all'] == '1'
) {
$log->logAction(ADM_ACTION, LOG_NOTICE, 'sending messages to admins'); $log->logAction(ADM_ACTION, LOG_NOTICE, 'sending messages to admins');
$result = Database::query('SELECT `name`, `email` FROM `' . TABLE_PANEL_ADMINS . "`"); $result = Database::query('SELECT `name`, `email` FROM `' . TABLE_PANEL_ADMINS . "`");
} elseif ($_POST['receipient'] == 1) { } elseif ($_POST['receipient'] == 1) {
@@ -48,9 +43,10 @@ if ($page == 'message') {
$log->logAction(ADM_ACTION, LOG_NOTICE, 'sending messages to customers'); $log->logAction(ADM_ACTION, LOG_NOTICE, 'sending messages to customers');
$result = Database::prepare(' $result = Database::prepare('
SELECT `firstname`, `name`, `company`, `email` FROM `' . TABLE_PANEL_CUSTOMERS . "` SELECT `firstname`, `name`, `company`, `email` FROM `' . TABLE_PANEL_CUSTOMERS . "`
WHERE `adminid` = :adminid" WHERE `adminid` = :adminid");
); Database::pexecute($result, array(
Database::pexecute($result, array('adminid' => $userinfo['adminid'])); 'adminid' => $userinfo['adminid']
));
} }
} else { } else {
\Froxlor\UI\Response::standard_error('noreceipientsgiven'); \Froxlor\UI\Response::standard_error('noreceipientsgiven');
@@ -68,7 +64,11 @@ if ($page == 'message') {
$row['firstname'] = isset($row['firstname']) ? $row['firstname'] : ''; $row['firstname'] = isset($row['firstname']) ? $row['firstname'] : '';
$row['company'] = isset($row['company']) ? $row['company'] : ''; $row['company'] = isset($row['company']) ? $row['company'] : '';
$mail->AddAddress($row['email'], getCorrectUserSalutation(array('firstname' => $row['firstname'], 'name' => $row['name'], 'company' => $row['company']))); $mail->AddAddress($row['email'], getCorrectUserSalutation(array(
'firstname' => $row['firstname'],
'name' => $row['name'],
'company' => $row['company']
)));
$mail->From = $userinfo['email']; $mail->From = $userinfo['email'];
$mail->FromName = (isset($userinfo['firstname']) ? $userinfo['firstname'] . ' ' : '') . $userinfo['name']; $mail->FromName = (isset($userinfo['firstname']) ? $userinfo['firstname'] . ' ' : '') . $userinfo['name'];
@@ -87,7 +87,12 @@ if ($page == 'message') {
$mail->ClearAddresses(); $mail->ClearAddresses();
} }
\Froxlor\UI\Response::redirectTo($filename, array('page' => $page, 's' => $s, 'action' => 'showsuccess', 'sentitems' => $mailcounter)); \Froxlor\UI\Response::redirectTo($filename, array(
'page' => $page,
's' => $s,
'action' => 'showsuccess',
'sentitems' => $mailcounter
));
} else { } else {
\Froxlor\UI\Response::standard_error('nomessagetosend'); \Froxlor\UI\Response::standard_error('nomessagetosend');
} }
@@ -104,7 +109,6 @@ if ($page == 'message') {
} else { } else {
$successmessage = str_replace('%s', $sentitems, $lng['message']['success']); $successmessage = str_replace('%s', $sentitems, $lng['message']['success']);
} }
} else { } else {
$success = 0; $success = 0;
$sentitems = 0; $sentitems = 0;

View File

@@ -17,28 +17,24 @@
* Based on https://github.com/amnuts/opcache-gui * Based on https://github.com/amnuts/opcache-gui
* *
*/ */
define('AREA', 'admin'); define('AREA', 'admin');
require './lib/init.php'; require './lib/init.php';
if ($action == 'reset' && function_exists('opcache_reset') && $userinfo['change_serversettings'] == '1') {
if ($action == 'reset' &&
function_exists('opcache_reset') &&
$userinfo['change_serversettings'] == '1'
) {
opcache_reset(); opcache_reset();
$log->logAction(ADM_ACTION, LOG_INFO, "reseted OPcache"); $log->logAction(ADM_ACTION, LOG_INFO, "reseted OPcache");
header('Location: ' . $linker->getLink(array('section' => 'opcacheinfo', 'page' => 'showinfo'))); header('Location: ' . $linker->getLink(array(
'section' => 'opcacheinfo',
'page' => 'showinfo'
)));
exit(); exit();
} }
if (!function_exists('opcache_get_configuration') if (! function_exists('opcache_get_configuration')) {
) {
\Froxlor\UI\Response::standard_error($lng['error']['no_opcacheinfo']); \Froxlor\UI\Response::standard_error($lng['error']['no_opcacheinfo']);
} }
if ($page == 'showinfo' if ($page == 'showinfo') {
) {
$opcache_info = opcache_get_configuration(); $opcache_info = opcache_get_configuration();
$opcache_status = opcache_get_status(false); $opcache_status = opcache_get_status(false);
@@ -85,14 +81,11 @@ if ($page == 'showinfo'
'oom_restarts' => number_format(@$opcache_status['opcache_statistics']['oom_restarts'] ?: 0, 0, '.', ' '), 'oom_restarts' => number_format(@$opcache_status['opcache_statistics']['oom_restarts'] ?: 0, 0, '.', ' '),
'hash_restarts' => number_format(@$opcache_status['opcache_statistics']['hash_restarts'] ?: 0, 0, '.', ' '), 'hash_restarts' => number_format(@$opcache_status['opcache_statistics']['hash_restarts'] ?: 0, 0, '.', ' '),
'manual_restarts' => number_format(@$opcache_status['opcache_statistics']['manual_restarts'] ?: 0, 0, '.', ' '), 'manual_restarts' => number_format(@$opcache_status['opcache_statistics']['manual_restarts'] ?: 0, 0, '.', ' '),
'status' => (@$opcache_status['restart_in_progress'] ? $lng['opcacheinfo']['restartinprogress'] : 'status' => (@$opcache_status['restart_in_progress'] ? $lng['opcacheinfo']['restartinprogress'] : (@$opcache_status['restart_pending'] ? $lng['opcacheinfo']['restartpending'] : (@$opcache_status['cache_full'] ? $lng['opcacheinfo']['cachefull'] : (@$opcache_status['opcache_enabled'] ? $lng['opcacheinfo']['enabled'] : $lng['opcacheinfo']['novalue'])))),
(@$opcache_status['restart_pending'] ? $lng['opcacheinfo']['restartpending'] :
(@$opcache_status['cache_full'] ? $lng['opcacheinfo']['cachefull'] :
(@$opcache_status['opcache_enabled'] ? $lng['opcacheinfo']['enabled'] : $lng['opcacheinfo']['novalue'])))),
'cachedscripts' => number_format(@$opcache_status['opcache_statistics']['num_cached_scripts'] ?: 0, 0, '.', ' '), 'cachedscripts' => number_format(@$opcache_status['opcache_statistics']['num_cached_scripts'] ?: 0, 0, '.', ' '),
'cachehits' => number_format($cachehits, 0, '.', ' ') . ($cachetotal > 0 ? sprintf(" (%.1f %%)", $cachehits / ($cachetotal) * 100) : ''), 'cachehits' => number_format($cachehits, 0, '.', ' ') . ($cachetotal > 0 ? sprintf(" (%.1f %%)", $cachehits / ($cachetotal) * 100) : ''),
'cachemiss' => number_format($cachemiss, 0, '.', ' ') . ($cachetotal > 0 ? sprintf(" (%.1f %%)", $cachemiss / ($cachetotal) * 100) : ''), 'cachemiss' => number_format($cachemiss, 0, '.', ' ') . ($cachetotal > 0 ? sprintf(" (%.1f %%)", $cachemiss / ($cachetotal) * 100) : ''),
'blacklistmiss' => number_format($blacklistmiss,0,'.',' ') . ($cachetotal>0 ? sprintf(" (%.1f %%)", $blacklistmiss/($cachetotal)*100) : ''), 'blacklistmiss' => number_format($blacklistmiss, 0, '.', ' ') . ($cachetotal > 0 ? sprintf(" (%.1f %%)", $blacklistmiss / ($cachetotal) * 100) : '')
); );
$usedmem = @$opcache_status['memory_usage']['used_memory'] ?: 0; $usedmem = @$opcache_status['memory_usage']['used_memory'] ?: 0;
@@ -107,7 +100,7 @@ if ($page == 'showinfo'
'total' => bsize($totalmem), 'total' => bsize($totalmem),
'used' => $usedmemstr . ($totalmem > 0 ? sprintf(" (%.1f %%)", $usedmem / ($totalmem) * 100) : ''), 'used' => $usedmemstr . ($totalmem > 0 ? sprintf(" (%.1f %%)", $usedmem / ($totalmem) * 100) : ''),
'free' => $freememstr . ($totalmem > 0 ? sprintf(" (%.1f %%)", $freemem / ($totalmem) * 100) : ''), 'free' => $freememstr . ($totalmem > 0 ? sprintf(" (%.1f %%)", $freemem / ($totalmem) * 100) : ''),
'wasted' => $wastedmemstr . ($totalmem>0 ? sprintf(" (%.1f %%)", $wastedmem/($totalmem)*100) : ''), 'wasted' => $wastedmemstr . ($totalmem > 0 ? sprintf(" (%.1f %%)", $wastedmem / ($totalmem) * 100) : '')
); );
} }
@@ -121,7 +114,7 @@ if ($page == 'showinfo'
'total' => bsize($totalstring), 'total' => bsize($totalstring),
'used' => $usedstringstr . ($totalstring > 0 ? sprintf(" (%.1f %%)", $usedstring / $totalstring * 100) : ''), 'used' => $usedstringstr . ($totalstring > 0 ? sprintf(" (%.1f %%)", $usedstring / $totalstring * 100) : ''),
'free' => $freestringstr . ($totalstring > 0 ? sprintf(" (%.1f %%)", $freestring / $totalstring * 100) : ''), 'free' => $freestringstr . ($totalstring > 0 ? sprintf(" (%.1f %%)", $freestring / $totalstring * 100) : ''),
'strcount' => number_format(@$opcache_status['interned_strings_usage']['number_of_strings'] ?: 0,0,'.',' '), 'strcount' => number_format(@$opcache_status['interned_strings_usage']['number_of_strings'] ?: 0, 0, '.', ' ')
); );
} }
@@ -133,7 +126,7 @@ if ($page == 'showinfo'
$keystat = array( $keystat = array(
'total' => number_format($totalkey, 0, '.', ' '), 'total' => number_format($totalkey, 0, '.', ' '),
'used' => $usedkeystr . ($totalkey > 0 ? sprintf(" (%.1f %%)", $usedkey / ($totalkey) * 100) : ''), 'used' => $usedkeystr . ($totalkey > 0 ? sprintf(" (%.1f %%)", $usedkey / ($totalkey) * 100) : ''),
'wasted' => number_format($wastedkey,0,'.',' ') . ($totalkey>0 ? sprintf(" (%.1f %%)", $wastedkey/($totalkey)*100) : ''), 'wasted' => number_format($wastedkey, 0, '.', ' ') . ($totalkey > 0 ? sprintf(" (%.1f %%)", $wastedkey / ($totalkey) * 100) : '')
); );
} }
@@ -145,11 +138,16 @@ if ($page == 'showinfo'
} }
eval("echo \"" . \Froxlor\UI\Template::getTemplate("settings/opcacheinfo/showinfo") . "\";"); eval("echo \"" . \Froxlor\UI\Template::getTemplate("settings/opcacheinfo/showinfo") . "\";");
} }
function bsize($s) { function bsize($s)
foreach (array('', 'K', 'M', 'G') as $i => $k) { {
foreach (array(
'',
'K',
'M',
'G'
) as $i => $k) {
if ($s < 1024) if ($s < 1024)
break; break;
$s /= 1024; $s /= 1024;

View File

@@ -110,7 +110,9 @@ if ($page == 'overview') {
if ($action == 'delete') { if ($action == 'delete') {
try { try {
$json_result = PhpSettings::getLocal($userinfo, array('id' => $id))->get(); $json_result = PhpSettings::getLocal($userinfo, array(
'id' => $id
))->get();
} catch (Exception $e) { } catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage()); \Froxlor\UI\Response::dynamic_error($e->getMessage());
} }
@@ -121,7 +123,9 @@ if ($page == 'overview') {
if (isset($_POST['send']) && $_POST['send'] == 'send') { if (isset($_POST['send']) && $_POST['send'] == 'send') {
try { try {
PhpSettings::getLocal($userinfo, array('id' => $id))->delete(); PhpSettings::getLocal($userinfo, array(
'id' => $id
))->delete();
} catch (Exception $e) { } catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage()); \Froxlor\UI\Response::dynamic_error($e->getMessage());
} }
@@ -144,7 +148,9 @@ if ($page == 'overview') {
if ($action == 'edit') { if ($action == 'edit') {
try { try {
$json_result = PhpSettings::getLocal($userinfo, array('id' => $id))->get(); $json_result = PhpSettings::getLocal($userinfo, array(
'id' => $id
))->get();
} catch (Exception $e) { } catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage()); \Froxlor\UI\Response::dynamic_error($e->getMessage());
} }
@@ -248,7 +254,9 @@ if ($page == 'overview') {
if ($action == 'delete') { if ($action == 'delete') {
try { try {
$json_result = FpmDaemons::getLocal($userinfo, array('id' => $id))->get(); $json_result = FpmDaemons::getLocal($userinfo, array(
'id' => $id
))->get();
} catch (Exception $e) { } catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage()); \Froxlor\UI\Response::dynamic_error($e->getMessage());
} }
@@ -285,7 +293,9 @@ if ($page == 'overview') {
if ($action == 'edit') { if ($action == 'edit') {
try { try {
$json_result = FpmDaemons::getLocal($userinfo, array('id' => $id))->get(); $json_result = FpmDaemons::getLocal($userinfo, array(
'id' => $id
))->get();
} catch (Exception $e) { } catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage()); \Froxlor\UI\Response::dynamic_error($e->getMessage());
} }

View File

@@ -16,7 +16,6 @@
* @package Panel * @package Panel
* *
*/ */
define('AREA', 'admin'); define('AREA', 'admin');
require './lib/init.php'; require './lib/init.php';
@@ -26,7 +25,6 @@ use Froxlor\Settings as Settings;
if (isset($_POST['subjectid'])) { if (isset($_POST['subjectid'])) {
$subjectid = intval($_POST['subjectid']); $subjectid = intval($_POST['subjectid']);
$mailbodyid = intval($_POST['mailbodyid']); $mailbodyid = intval($_POST['mailbodyid']);
} elseif (isset($_GET['subjectid'])) { } elseif (isset($_GET['subjectid'])) {
$subjectid = intval($_GET['subjectid']); $subjectid = intval($_GET['subjectid']);
$mailbodyid = intval($_GET['mailbodyid']); $mailbodyid = intval($_GET['mailbodyid']);
@@ -34,7 +32,6 @@ if (isset($_POST['subjectid'])) {
if (isset($_POST['id'])) { if (isset($_POST['id'])) {
$id = intval($_POST['id']); $id = intval($_POST['id']);
} elseif (isset($_GET['id'])) { } elseif (isset($_GET['id'])) {
$id = intval($_GET['id']); $id = intval($_GET['id']);
} }
@@ -49,10 +46,7 @@ $available_templates = array(
// only show templates of features that are enabled #1191 // only show templates of features that are enabled #1191
if ((int) Settings::Get('system.report_enable') == 1) { if ((int) Settings::Get('system.report_enable') == 1) {
array_push($available_templates, array_push($available_templates, 'trafficmaxpercent', 'diskmaxpercent');
'trafficmaxpercent',
'diskmaxpercent'
);
} }
$file_templates = array( $file_templates = array(
@@ -71,9 +65,10 @@ if ($action == '') {
$result_stmt = Database::prepare(" $result_stmt = Database::prepare("
SELECT `id`, `language`, `varname` FROM `" . TABLE_PANEL_TEMPLATES . "` SELECT `id`, `language`, `varname` FROM `" . TABLE_PANEL_TEMPLATES . "`
WHERE `adminid` = :adminid AND `templategroup`='mails' WHERE `adminid` = :adminid AND `templategroup`='mails'
ORDER BY `language`, `varname`" ORDER BY `language`, `varname`");
); Database::pexecute($result_stmt, array(
Database::pexecute($result_stmt, array('adminid' => $userinfo['adminid'])); 'adminid' => $userinfo['adminid']
));
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) { while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
$parts = array(); $parts = array();
@@ -98,9 +93,11 @@ if ($action == '') {
$result_stmt = Database::prepare(" $result_stmt = Database::prepare("
SELECT `varname` FROM `" . TABLE_PANEL_TEMPLATES . "` SELECT `varname` FROM `" . TABLE_PANEL_TEMPLATES . "`
WHERE `adminid` = :adminid AND `language`= :lang WHERE `adminid` = :adminid AND `language`= :lang
AND `templategroup` = 'mails' AND `varname` LIKE '%_subject'" AND `templategroup` = 'mails' AND `varname` LIKE '%_subject'");
); Database::pexecute($result_stmt, array(
Database::pexecute($result_stmt, array('adminid' => $userinfo['adminid'], 'lang' => $language_name)); 'adminid' => $userinfo['adminid'],
'lang' => $language_name
));
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) { while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
$templates_done[] = str_replace('_subject', '', $row['varname']); $templates_done[] = str_replace('_subject', '', $row['varname']);
@@ -116,9 +113,10 @@ if ($action == '') {
$filetemplateadd = false; $filetemplateadd = false;
$result_stmt = Database::prepare(" $result_stmt = Database::prepare("
SELECT `id`, `varname` FROM `" . TABLE_PANEL_TEMPLATES . "` SELECT `id`, `varname` FROM `" . TABLE_PANEL_TEMPLATES . "`
WHERE `adminid` = :adminid AND `templategroup`='files'" WHERE `adminid` = :adminid AND `templategroup`='files'");
); Database::pexecute($result_stmt, array(
Database::pexecute($result_stmt, array('adminid' => $userinfo['adminid'])); 'adminid' => $userinfo['adminid']
));
if (Database::num_rows() != count($file_templates)) { if (Database::num_rows() != count($file_templates)) {
$filetemplateadd = true; $filetemplateadd = true;
@@ -128,83 +126,86 @@ if ($action == '') {
eval("\$filetemplates.=\"" . \Froxlor\UI\Template::getTemplate("templates/templates_filetemplate") . "\";"); eval("\$filetemplates.=\"" . \Froxlor\UI\Template::getTemplate("templates/templates_filetemplate") . "\";");
} }
eval("echo \"" . \Froxlor\UI\Template::getTemplate("templates/templates") . "\";"); eval("echo \"" . \Froxlor\UI\Template::getTemplate("templates/templates") . "\";");
} elseif ($action == 'delete' && $subjectid != 0 && $mailbodyid != 0) {
} elseif($action == 'delete'
&& $subjectid != 0
&& $mailbodyid != 0
) {
// email templates // email templates
$result_stmt = Database::prepare(" $result_stmt = Database::prepare("
SELECT `language`, `varname` FROM `" . TABLE_PANEL_TEMPLATES . "` SELECT `language`, `varname` FROM `" . TABLE_PANEL_TEMPLATES . "`
WHERE `adminid` = :adminid AND `id` = :id" WHERE `adminid` = :adminid AND `id` = :id");
); Database::pexecute($result_stmt, array(
Database::pexecute($result_stmt, array('adminid' => $userinfo['adminid'], 'id' => $subjectid)); 'adminid' => $userinfo['adminid'],
'id' => $subjectid
));
$result = $result_stmt->fetch(PDO::FETCH_ASSOC); $result = $result_stmt->fetch(PDO::FETCH_ASSOC);
if ($result['varname'] != '') { if ($result['varname'] != '') {
if (isset($_POST['send']) if (isset($_POST['send']) && $_POST['send'] == 'send') {
&& $_POST['send'] == 'send'
) {
$del_stmt = Database::prepare(" $del_stmt = Database::prepare("
DELETE FROM `" . TABLE_PANEL_TEMPLATES . "` DELETE FROM `" . TABLE_PANEL_TEMPLATES . "`
WHERE `adminid` = :adminid WHERE `adminid` = :adminid
AND (`id` = :ida OR `id` = :idb)" AND (`id` = :ida OR `id` = :idb)");
);
Database::pexecute($del_stmt, array( Database::pexecute($del_stmt, array(
'adminid' => $userinfo['adminid'], 'adminid' => $userinfo['adminid'],
'ida' => $subjectid, 'ida' => $subjectid,
'idb' => $mailbodyid 'idb' => $mailbodyid
)); ));
$log->logAction(ADM_ACTION, LOG_INFO, "deleted template '" . $result['language'] . ' - ' . $lng['admin']['templates'][str_replace('_subject', '', $result['varname'])] . "'"); $log->logAction(ADM_ACTION, LOG_INFO, "deleted template '" . $result['language'] . ' - ' . $lng['admin']['templates'][str_replace('_subject', '', $result['varname'])] . "'");
\Froxlor\UI\Response::redirectTo($filename, array('page' => $page, 's' => $s)); \Froxlor\UI\Response::redirectTo($filename, array(
'page' => $page,
's' => $s
));
} else { } else {
ask_yesno('admin_template_reallydelete', $filename, array('subjectid' => $subjectid, 'mailbodyid' => $mailbodyid, 'page' => $page, 'action' => $action), $result['language'] . ' - ' . $lng['admin']['templates'][str_replace('_subject', '', $result['varname'])]); ask_yesno('admin_template_reallydelete', $filename, array(
'subjectid' => $subjectid,
'mailbodyid' => $mailbodyid,
'page' => $page,
'action' => $action
), $result['language'] . ' - ' . $lng['admin']['templates'][str_replace('_subject', '', $result['varname'])]);
} }
} }
} elseif ($action == 'deletef' && $id != 0) {
} elseif($action == 'deletef'
&& $id != 0
) {
// file templates // file templates
$result_stmt = Database::prepare(" $result_stmt = Database::prepare("
SELECT * FROM `" . TABLE_PANEL_TEMPLATES . "` SELECT * FROM `" . TABLE_PANEL_TEMPLATES . "`
WHERE `adminid` = :adminid AND `id` = :id" WHERE `adminid` = :adminid AND `id` = :id");
); Database::pexecute($result_stmt, array(
Database::pexecute($result_stmt, array('adminid' => $userinfo['adminid'], 'id' => $id)); 'adminid' => $userinfo['adminid'],
'id' => $id
));
if (Database::num_rows() > 0) { if (Database::num_rows() > 0) {
$row = $result_stmt->fetch(PDO::FETCH_ASSOC); $row = $result_stmt->fetch(PDO::FETCH_ASSOC);
if (isset($_POST['send']) if (isset($_POST['send']) && $_POST['send'] == 'send') {
&& $_POST['send'] == 'send'
) {
$del_stmt = Database::prepare(" $del_stmt = Database::prepare("
DELETE FROM `" . TABLE_PANEL_TEMPLATES . "` DELETE FROM `" . TABLE_PANEL_TEMPLATES . "`
WHERE `adminid` = :adminid AND `id` = :id" WHERE `adminid` = :adminid AND `id` = :id");
); Database::pexecute($del_stmt, array(
Database::pexecute($del_stmt, array('adminid' => $userinfo['adminid'], 'id' => $id)); 'adminid' => $userinfo['adminid'],
'id' => $id
));
$log->logAction(ADM_ACTION, LOG_INFO, "deleted template '" . $lng['admin']['templates'][$row['varname']] . "'"); $log->logAction(ADM_ACTION, LOG_INFO, "deleted template '" . $lng['admin']['templates'][$row['varname']] . "'");
\Froxlor\UI\Response::redirectTo($filename, array('page' => $page, 's' => $s)); \Froxlor\UI\Response::redirectTo($filename, array(
'page' => $page,
's' => $s
));
} else { } else {
ask_yesno('admin_template_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $lng['admin']['templates'][$row['varname']]); ask_yesno('admin_template_reallydelete', $filename, array(
'id' => $id,
'page' => $page,
'action' => $action
), $lng['admin']['templates'][$row['varname']]);
} }
} else { } else {
\Froxlor\UI\Response::standard_error('templatenotfound'); \Froxlor\UI\Response::standard_error('templatenotfound');
} }
} elseif ($action == 'add') { } elseif ($action == 'add') {
if (Settings::Get('panel.sendalternativemail') == 1) { if (Settings::Get('panel.sendalternativemail') == 1) {
$available_templates[] = 'pop_success_alternative'; $available_templates[] = 'pop_success_alternative';
} }
if (isset($_POST['prepare']) if (isset($_POST['prepare']) && $_POST['prepare'] == 'prepare') {
&& $_POST['prepare'] == 'prepare'
) {
// email templates // email templates
$language = htmlentities(validate($_POST['language'], 'language', '/^[^\r\n\0"\']+$/', 'nolanguageselect')); $language = htmlentities(validate($_POST['language'], 'language', '/^[^\r\n\0"\']+$/', 'nolanguageselect'));
$template = validate($_POST['template'], 'template'); $template = validate($_POST['template'], 'template');
@@ -231,10 +232,7 @@ if ($action == '') {
$image = $template_add_data['template_add']['image']; $image = $template_add_data['template_add']['image'];
eval("echo \"" . \Froxlor\UI\Template::getTemplate("templates/templates_add_2") . "\";"); eval("echo \"" . \Froxlor\UI\Template::getTemplate("templates/templates_add_2") . "\";");
} elseif (isset($_POST['send']) && $_POST['send'] == 'send') {
} elseif(isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
// email templates // email templates
$language = htmlentities(validate($_POST['language'], 'language', '/^[^\r\n\0"\']+$/', 'nolanguageselect')); $language = htmlentities(validate($_POST['language'], 'language', '/^[^\r\n\0"\']+$/', 'nolanguageselect'));
$template = validate($_POST['template'], 'template'); $template = validate($_POST['template'], 'template');
@@ -244,9 +242,11 @@ if ($action == '') {
$result_stmt = Database::prepare(" $result_stmt = Database::prepare("
SELECT `varname` FROM `" . TABLE_PANEL_TEMPLATES . "` SELECT `varname` FROM `" . TABLE_PANEL_TEMPLATES . "`
WHERE `adminid` = :adminid AND `language` = :lang WHERE `adminid` = :adminid AND `language` = :lang
AND `templategroup` = 'mails' AND `varname` LIKE '%_subject'" AND `templategroup` = 'mails' AND `varname` LIKE '%_subject'");
); Database::pexecute($result_stmt, array(
Database::pexecute($result_stmt, array('adminid' => $userinfo['adminid'], 'lang' => $language)); 'adminid' => $userinfo['adminid'],
'lang' => $language
));
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) { while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
$templates[] = str_replace('_subject', '', $row['varname']); $templates[] = str_replace('_subject', '', $row['varname']);
@@ -255,7 +255,6 @@ if ($action == '') {
$templates = array_diff($available_templates, $templates); $templates = array_diff($available_templates, $templates);
if (array_search($template, $templates) === false) { if (array_search($template, $templates) === false) {
\Froxlor\UI\Response::standard_error('templatenotfound'); \Froxlor\UI\Response::standard_error('templatenotfound');
} else { } else {
$ins_stmt = Database::prepare(" $ins_stmt = Database::prepare("
INSERT INTO `" . TABLE_PANEL_TEMPLATES . "` SET INSERT INTO `" . TABLE_PANEL_TEMPLATES . "` SET
@@ -263,8 +262,7 @@ if ($action == '') {
`language` = :lang, `language` = :lang,
`templategroup` = 'mails', `templategroup` = 'mails',
`varname` = :var, `varname` = :var,
`value` = :value" `value` = :value");
);
// mail-subject // mail-subject
$ins_data = array( $ins_data = array(
@@ -285,12 +283,12 @@ if ($action == '') {
Database::pexecute($ins_stmt, $ins_data); Database::pexecute($ins_stmt, $ins_data);
$log->logAction(ADM_ACTION, LOG_INFO, "added template '" . $language . ' - ' . $template . "'"); $log->logAction(ADM_ACTION, LOG_INFO, "added template '" . $language . ' - ' . $template . "'");
\Froxlor\UI\Response::redirectTo($filename, array('page' => $page, 's' => $s)); \Froxlor\UI\Response::redirectTo($filename, array(
'page' => $page,
's' => $s
));
} }
} elseif (isset($_POST['filesend']) && $_POST['filesend'] == 'filesend') {
} elseif(isset($_POST['filesend'])
&& $_POST['filesend'] == 'filesend'
) {
// file templates // file templates
$template = validate($_POST['template'], 'template'); $template = validate($_POST['template'], 'template');
$filecontent = validate($_POST['filecontent'], 'filecontent', '/^[^\0]+$/', 'filecontentnotset'); $filecontent = validate($_POST['filecontent'], 'filecontent', '/^[^\0]+$/', 'filecontentnotset');
@@ -301,8 +299,7 @@ if ($action == '') {
`language` = '', `language` = '',
`templategroup` = 'files', `templategroup` = 'files',
`varname` = :var, `varname` = :var,
`value` = :value" `value` = :value");
);
$ins_data = array( $ins_data = array(
'adminid' => $userinfo['adminid'], 'adminid' => $userinfo['adminid'],
@@ -312,8 +309,10 @@ if ($action == '') {
Database::pexecute($ins_stmt, $ins_data); Database::pexecute($ins_stmt, $ins_data);
$log->logAction(ADM_ACTION, LOG_INFO, "added template '" . $template . "'"); $log->logAction(ADM_ACTION, LOG_INFO, "added template '" . $template . "'");
\Froxlor\UI\Response::redirectTo($filename, array('page' => $page, 's' => $s)); \Froxlor\UI\Response::redirectTo($filename, array(
'page' => $page,
's' => $s
));
} elseif (! isset($_GET['files'])) { } elseif (! isset($_GET['files'])) {
// email templates // email templates
@@ -326,9 +325,11 @@ if ($action == '') {
$result_stmt = Database::prepare(" $result_stmt = Database::prepare("
SELECT `varname` FROM `" . TABLE_PANEL_TEMPLATES . "` SELECT `varname` FROM `" . TABLE_PANEL_TEMPLATES . "`
WHERE `adminid` = :adminid AND `language` = :lang WHERE `adminid` = :adminid AND `language` = :lang
AND `templategroup` = 'mails' AND `varname` LIKE '%_subject'" AND `templategroup` = 'mails' AND `varname` LIKE '%_subject'");
); Database::pexecute($result_stmt, array(
Database::pexecute($result_stmt, array('adminid' => $userinfo['adminid'], 'lang' => $language_name)); 'adminid' => $userinfo['adminid'],
'lang' => $language_name
));
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) { while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
$templates[] = str_replace('_subject', '', $row['varname']); $templates[] = str_replace('_subject', '', $row['varname']);
@@ -351,18 +352,17 @@ if ($action == '') {
} else { } else {
\Froxlor\UI\Response::standard_error('alltemplatesdefined'); \Froxlor\UI\Response::standard_error('alltemplatesdefined');
} }
} else { } else {
// filetemplates // filetemplates
$result_stmt = Database::prepare(" $result_stmt = Database::prepare("
SELECT `id`, `varname` FROM `" . TABLE_PANEL_TEMPLATES . "` SELECT `id`, `varname` FROM `" . TABLE_PANEL_TEMPLATES . "`
WHERE `adminid` = :adminid AND `templategroup`='files'" WHERE `adminid` = :adminid AND `templategroup`='files'");
); Database::pexecute($result_stmt, array(
Database::pexecute($result_stmt, array('adminid' => $userinfo['adminid'])); 'adminid' => $userinfo['adminid']
));
if (Database::num_rows() == count($file_templates)) { if (Database::num_rows() == count($file_templates)) {
\Froxlor\UI\Response::standard_error('alltemplatesdefined'); \Froxlor\UI\Response::standard_error('alltemplatesdefined');
} else { } else {
$templatesdefined = array(); $templatesdefined = array();
@@ -385,32 +385,27 @@ if ($action == '') {
eval("echo \"" . \Froxlor\UI\Template::getTemplate("templates/filetemplates_add") . "\";"); eval("echo \"" . \Froxlor\UI\Template::getTemplate("templates/filetemplates_add") . "\";");
} }
} }
} elseif ($action == 'edit' && $subjectid != 0 && $mailbodyid != 0) {
} elseif($action == 'edit'
&& $subjectid != 0
&& $mailbodyid != 0
) {
// email templates // email templates
$result_stmt = Database::prepare(" $result_stmt = Database::prepare("
SELECT `language`, `varname`, `value` FROM `" . TABLE_PANEL_TEMPLATES . "` SELECT `language`, `varname`, `value` FROM `" . TABLE_PANEL_TEMPLATES . "`
WHERE `adminid` = :adminid AND `id` = :subjectid" WHERE `adminid` = :adminid AND `id` = :subjectid");
); Database::pexecute($result_stmt, array(
Database::pexecute($result_stmt, array('adminid' => $userinfo['adminid'], 'subjectid' => $subjectid)); 'adminid' => $userinfo['adminid'],
'subjectid' => $subjectid
));
$result = $result_stmt->fetch(PDO::FETCH_ASSOC); $result = $result_stmt->fetch(PDO::FETCH_ASSOC);
if ($result['varname'] != '') { if ($result['varname'] != '') {
if (isset($_POST['send']) if (isset($_POST['send']) && $_POST['send'] == 'send') {
&& $_POST['send'] == 'send'
) {
$subject = validate($_POST['subject'], 'subject', '/^[^\r\n\0]+$/', 'nosubjectcreate'); $subject = validate($_POST['subject'], 'subject', '/^[^\r\n\0]+$/', 'nosubjectcreate');
$mailbody = validate($_POST['mailbody'], 'mailbody', '/^[^\0]+$/', 'nomailbodycreate'); $mailbody = validate($_POST['mailbody'], 'mailbody', '/^[^\0]+$/', 'nomailbodycreate');
$upd_stmt = Database::prepare(" $upd_stmt = Database::prepare("
UPDATE `" . TABLE_PANEL_TEMPLATES . "` SET UPDATE `" . TABLE_PANEL_TEMPLATES . "` SET
`value` = :value `value` = :value
WHERE `adminid` = :adminid AND `id` = :id" WHERE `adminid` = :adminid AND `id` = :id");
);
// subject // subject
Database::pexecute($upd_stmt, array( Database::pexecute($upd_stmt, array(
'value' => $subject, 'value' => $subject,
@@ -425,8 +420,10 @@ if ($action == '') {
)); ));
$log->logAction(ADM_ACTION, LOG_INFO, "edited template '" . $result['varname'] . "'"); $log->logAction(ADM_ACTION, LOG_INFO, "edited template '" . $result['varname'] . "'");
\Froxlor\UI\Response::redirectTo($filename, array('page' => $page, 's' => $s)); \Froxlor\UI\Response::redirectTo($filename, array(
'page' => $page,
's' => $s
));
} else { } else {
$result = htmlentities_array($result); $result = htmlentities_array($result);
@@ -435,9 +432,10 @@ if ($action == '') {
$result_stmt = Database::prepare(" $result_stmt = Database::prepare("
SELECT `language`, `varname`, `value` SELECT `language`, `varname`, `value`
FROM `" . TABLE_PANEL_TEMPLATES . "` FROM `" . TABLE_PANEL_TEMPLATES . "`
WHERE `id` = :id" WHERE `id` = :id");
); Database::pexecute($result_stmt, array(
Database::pexecute($result_stmt, array('id' => $mailbodyid)); 'id' => $mailbodyid
));
$result = $result_stmt->fetch(PDO::FETCH_ASSOC); $result = $result_stmt->fetch(PDO::FETCH_ASSOC);
$template_name = str_replace('_mailbody', '', $result['varname']); $template_name = str_replace('_mailbody', '', $result['varname']);
@@ -456,31 +454,27 @@ if ($action == '') {
eval("echo \"" . \Froxlor\UI\Template::getTemplate("templates/templates_edit") . "\";"); eval("echo \"" . \Froxlor\UI\Template::getTemplate("templates/templates_edit") . "\";");
} }
} }
} elseif ($action == 'editf' && $id != 0) {
} elseif($action == 'editf'
&& $id != 0
) {
// file templates // file templates
$result_stmt = Database::prepare(" $result_stmt = Database::prepare("
SELECT * FROM `" . TABLE_PANEL_TEMPLATES . "` SELECT * FROM `" . TABLE_PANEL_TEMPLATES . "`
WHERE `adminid` = :adminid AND `id` = :id" WHERE `adminid` = :adminid AND `id` = :id");
); Database::pexecute($result_stmt, array(
Database::pexecute($result_stmt, array('adminid' => $userinfo['adminid'], 'id' => $id)); 'adminid' => $userinfo['adminid'],
'id' => $id
));
if (Database::num_rows() > 0) { if (Database::num_rows() > 0) {
$row = $result_stmt->fetch(PDO::FETCH_ASSOC); $row = $result_stmt->fetch(PDO::FETCH_ASSOC);
// filetemplates // filetemplates
if (isset($_POST['filesend']) if (isset($_POST['filesend']) && $_POST['filesend'] == 'filesend') {
&& $_POST['filesend'] == 'filesend'
) {
$filecontent = validate($_POST['filecontent'], 'filecontent', '/^[^\0]+$/', 'filecontentnotset'); $filecontent = validate($_POST['filecontent'], 'filecontent', '/^[^\0]+$/', 'filecontentnotset');
$upd_stmt = Database::prepare(" $upd_stmt = Database::prepare("
UPDATE `" . TABLE_PANEL_TEMPLATES . "` SET UPDATE `" . TABLE_PANEL_TEMPLATES . "` SET
`value` = :value `value` = :value
WHERE `adminid` = :adminid AND `id` = :id" WHERE `adminid` = :adminid AND `id` = :id");
);
Database::pexecute($upd_stmt, array( Database::pexecute($upd_stmt, array(
'value' => $filecontent, 'value' => $filecontent,
'adminid' => $userinfo['adminid'], 'adminid' => $userinfo['adminid'],
@@ -488,8 +482,10 @@ if ($action == '') {
)); ));
$log->logAction(ADM_ACTION, LOG_INFO, "edited template '" . $row['varname'] . "'"); $log->logAction(ADM_ACTION, LOG_INFO, "edited template '" . $row['varname'] . "'");
\Froxlor\UI\Response::redirectTo($filename, array('page' => $page, 's' => $s)); \Froxlor\UI\Response::redirectTo($filename, array(
'page' => $page,
's' => $s
));
} else { } else {
$row = htmlentities_array($row); $row = htmlentities_array($row);
@@ -501,7 +497,6 @@ if ($action == '') {
eval("echo \"" . \Froxlor\UI\Template::getTemplate("templates/filetemplates_edit") . "\";"); eval("echo \"" . \Froxlor\UI\Template::getTemplate("templates/filetemplates_edit") . "\";");
} }
} else { } else {
\Froxlor\UI\Response::standard_error('templatenotfound'); \Froxlor\UI\Response::standard_error('templatenotfound');
} }

View File

@@ -15,7 +15,6 @@
* @package Panel * @package Panel
* *
*/ */
define('AREA', 'admin'); define('AREA', 'admin');
require './lib/init.php'; require './lib/init.php';
@@ -41,7 +40,7 @@ $months = array(
'9' => 'sep', '9' => 'sep',
'10' => 'oct', '10' => 'oct',
'11' => 'nov', '11' => 'nov',
'12' => 'dec', '12' => 'dec'
); );
if ($page == 'overview' || $page == 'customers') { if ($page == 'overview' || $page == 'customers') {
@@ -74,17 +73,17 @@ if ($page == 'overview' || $page == 'customers') {
'sep' => 0, 'sep' => 0,
'oct' => 0, 'oct' => 0,
'nov' => 0, 'nov' => 0,
'dec' => 0, 'dec' => 0
); );
$customer_name_list_stmt = Database::prepare(" $customer_name_list_stmt = Database::prepare("
SELECT `customerid`,`company`,`name`,`firstname` SELECT `customerid`,`company`,`name`,`firstname`
FROM `" . TABLE_PANEL_CUSTOMERS . "` FROM `" . TABLE_PANEL_CUSTOMERS . "`
WHERE `deactivated`='0'" . WHERE `deactivated`='0'" . ($userinfo['customers_see_all'] ? '' : " AND `adminid` = :id") . "
($userinfo['customers_see_all'] ? '' : " AND `adminid` = :id") . " ORDER BY name");
ORDER BY name" Database::pexecute($customer_name_list_stmt, array(
); 'id' => $userinfo['adminid']
Database::pexecute($customer_name_list_stmt, array('id' => $userinfo['adminid'])); ));
while ($customer_name = $customer_name_list_stmt->fetch(PDO::FETCH_ASSOC)) { while ($customer_name = $customer_name_list_stmt->fetch(PDO::FETCH_ASSOC)) {
@@ -102,16 +101,18 @@ if ($page == 'overview' || $page == 'customers') {
'sep' => '-', 'sep' => '-',
'oct' => '-', 'oct' => '-',
'nov' => '-', 'nov' => '-',
'dec' => '-', 'dec' => '-'
); );
$traffic_list_stmt = Database::prepare(" $traffic_list_stmt = Database::prepare("
SELECT month, SUM(http+ftp_up+ftp_down+mail)*1024 AS traffic SELECT month, SUM(http+ftp_up+ftp_down+mail)*1024 AS traffic
FROM `" . TABLE_PANEL_TRAFFIC . "` FROM `" . TABLE_PANEL_TRAFFIC . "`
WHERE year = :year AND `customerid` = :id WHERE year = :year AND `customerid` = :id
GROUP BY month ORDER BY month" GROUP BY month ORDER BY month");
); Database::pexecute($traffic_list_stmt, array(
Database::pexecute($traffic_list_stmt, array('year' => (date("Y")-$years), 'id' => $customer_name['customerid'])); 'year' => (date("Y") - $years),
'id' => $customer_name['customerid']
));
while ($traffic_month = $traffic_list_stmt->fetch(PDO::FETCH_ASSOC)) { while ($traffic_month = $traffic_list_stmt->fetch(PDO::FETCH_ASSOC)) {
$virtual_host[$months[(int) $traffic_month['month']]] = \Froxlor\PhpHelper::size_readable($traffic_month['traffic'], 'GiB', 'bi', '%01.' . (int) Settings::Get('panel.decimal_places') . 'f %s'); $virtual_host[$months[(int) $traffic_month['month']]] = \Froxlor\PhpHelper::size_readable($traffic_month['traffic'], 'GiB', 'bi', '%01.' . (int) Settings::Get('panel.decimal_places') . 'f %s');
@@ -121,7 +122,7 @@ if ($page == 'overview' || $page == 'customers') {
} }
// sum up totals // sum up totals
$virtual_host = array( $virtual_host = array(
'name' => $lng['traffic']['months']['total'], 'name' => $lng['traffic']['months']['total']
); );
foreach ($totals as $month => $bytes) { foreach ($totals as $month => $bytes) {
$virtual_host[$month] = ($bytes == 0 ? '-' : \Froxlor\PhpHelper::size_readable($bytes, 'GiB', 'bi', '%01.' . (int) Settings::Get('panel.decimal_places') . 'f %s')); $virtual_host[$month] = ($bytes == 0 ? '-' : \Froxlor\PhpHelper::size_readable($bytes, 'GiB', 'bi', '%01.' . (int) Settings::Get('panel.decimal_places') . 'f %s'));

View File

@@ -14,7 +14,6 @@
* @package Panel * @package Panel
* *
*/ */
define('AREA', 'admin'); define('AREA', 'admin');
require './lib/init.php'; require './lib/init.php';
@@ -30,14 +29,10 @@ if ($page == 'overview') {
* so we have to set them both to run a correct upgrade * so we have to set them both to run a correct upgrade
*/ */
if (! isFroxlor()) { if (! isFroxlor()) {
if (Settings::Get('panel.version') == null if (Settings::Get('panel.version') == null || Settings::Get('panel.version') == '') {
|| Settings::Get('panel.version') == ''
) {
Settings::Set('panel.version', '1.4.2.1'); Settings::Set('panel.version', '1.4.2.1');
} }
if (Settings::Get('system.dbversion') == null if (Settings::Get('system.dbversion') == null || Settings::Get('system.dbversion') == '') {
|| Settings::Get('system.dbversion') == ''
) {
/** /**
* for syscp-stable (1.4.2.1) this value has to be 0 * for syscp-stable (1.4.2.1) this value has to be 0
* so the required table-fields are added correctly * so the required table-fields are added correctly
@@ -45,8 +40,7 @@ if ($page == 'overview') {
* -> bug #54 * -> bug #54
*/ */
$result_stmt = Database::query(" $result_stmt = Database::query("
SELECT `value` FROM `" . TABLE_PANEL_SETTINGS . "` WHERE `varname` = 'dbversion'" SELECT `value` FROM `" . TABLE_PANEL_SETTINGS . "` WHERE `varname` = 'dbversion'");
);
$result = $result_stmt->fetch(PDO::FETCH_ASSOC); $result = $result_stmt->fetch(PDO::FETCH_ASSOC);
if (isset($result['value'])) { if (isset($result['value'])) {
@@ -61,14 +55,8 @@ if ($page == 'overview') {
$successful_update = false; $successful_update = false;
$message = ''; $message = '';
if (isset($_POST['send']) if (isset($_POST['send']) && $_POST['send'] == 'send') {
&& $_POST['send'] == 'send' if ((isset($_POST['update_preconfig']) && isset($_POST['update_changesagreed']) && intval($_POST['update_changesagreed']) != 0) || ! isset($_POST['update_preconfig'])) {
) {
if ((isset($_POST['update_preconfig'])
&& isset($_POST['update_changesagreed'])
&& intval($_POST['update_changesagreed']) != 0)
|| !isset($_POST['update_preconfig'])
) {
eval("echo \"" . \Froxlor\UI\Template::getTemplate('update/update_start') . "\";"); eval("echo \"" . \Froxlor\UI\Template::getTemplate('update/update_start') . "\";");
include_once './install/updatesql.php'; include_once './install/updatesql.php';

View File

@@ -70,8 +70,7 @@ if ($action == 'delete') {
// customer generates for himself, admins will see a customer-select-box later // customer generates for himself, admins will see a customer-select-box later
if (AREA == 'admin') { if (AREA == 'admin') {
$cid = 0; $cid = 0;
} } elseif (AREA == 'customer') {
elseif (AREA == 'customer') {
$cid = $userinfo['customerid']; $cid = $userinfo['customerid'];
} }
$key = hash('sha256', openssl_random_pseudo_bytes(64 * 64)); $key = hash('sha256', openssl_random_pseudo_bytes(64 * 64));
@@ -110,8 +109,7 @@ if ($action == 'delete') {
"); ");
if (AREA == 'admin') { if (AREA == 'admin') {
$cid = 0; $cid = 0;
} } elseif (AREA == 'customer') {
elseif (AREA == 'customer') {
$cid = $userinfo['customerid']; $cid = $userinfo['customerid'];
} }
Database::pexecute($upd_stmt, array( Database::pexecute($upd_stmt, array(
@@ -122,7 +120,7 @@ if ($action == 'delete') {
'cid' => $cid 'cid' => $cid
)); ));
echo json_encode(true); echo json_encode(true);
exit; exit();
} }
$log->logAction(USR_ACTION, LOG_NOTICE, "viewed api::api_keys"); $log->logAction(USR_ACTION, LOG_NOTICE, "viewed api::api_keys");

View File

@@ -19,7 +19,8 @@
depends="prepare,static-analysis-parallel,phpunit,phpdox,-check-failure" depends="prepare,static-analysis-parallel,phpunit,phpdox,-check-failure"
description="Performs static analysis (executing the tools in parallel), runs the tests, and generates project documentation" /> description="Performs static analysis (executing the tools in parallel), runs the tests, and generates project documentation" />
<target name="quick-build" depends="prepare,lint,phpunit-no-coverage" <target name="quick-build"
depends="prepare,lint,phpunit-no-coverage"
description="Performs a lint check and runs the tests (without generating code coverage reports)" /> description="Performs a lint check and runs the tests (without generating code coverage reports)" />
<target name="static-analysis" <target name="static-analysis"
@@ -41,7 +42,8 @@
</parallel> </parallel>
</target> </target>
<target name="clean" unless="clean.done" description="Cleanup build artifacts"> <target name="clean" unless="clean.done"
description="Cleanup build artifacts">
<delete dir="${basedir}/build/api" /> <delete dir="${basedir}/build/api" />
<delete dir="${basedir}/build/coverage" /> <delete dir="${basedir}/build/coverage" />
<delete dir="${basedir}/build/logs" /> <delete dir="${basedir}/build/logs" />
@@ -109,7 +111,8 @@
description="Calculate software metrics using PHP_Depend and log result in XML format. Intended for usage within a continuous integration environment."> description="Calculate software metrics using PHP_Depend and log result in XML format. Intended for usage within a continuous integration environment.">
<exec executable="${pdepend}" taskname="pdepend"> <exec executable="${pdepend}" taskname="pdepend">
<arg value="--jdepend-xml=${basedir}/build/logs/jdepend.xml" /> <arg value="--jdepend-xml=${basedir}/build/logs/jdepend.xml" />
<arg value="--jdepend-chart=${basedir}/build/pdepend/dependencies.svg" /> <arg
value="--jdepend-chart=${basedir}/build/pdepend/dependencies.svg" />
<arg <arg
value="--overview-pyramid=${basedir}/build/pdepend/overview-pyramid.svg" /> value="--overview-pyramid=${basedir}/build/pdepend/overview-pyramid.svg" />
<arg path="${basedir}/lib/Froxlor" /> <arg path="${basedir}/lib/Froxlor" />
@@ -204,7 +207,8 @@
<target name="phpunit-no-coverage" unless="phpunit.done" <target name="phpunit-no-coverage" unless="phpunit.done"
depends="prepare" depends="prepare"
description="Run unit tests with PHPUnit (without generating code coverage reports)"> description="Run unit tests with PHPUnit (without generating code coverage reports)">
<exec executable="${phpunit}" failonerror="true" taskname="phpunit"> <exec executable="${phpunit}" failonerror="true"
taskname="phpunit">
<arg value="--configuration" /> <arg value="--configuration" />
<arg path="${basedir}/phpunit.xml" /> <arg path="${basedir}/phpunit.xml" />
<arg value="--testsuite" /> <arg value="--testsuite" />
@@ -215,9 +219,11 @@
<property name="phpunit.done" value="true" /> <property name="phpunit.done" value="true" />
</target> </target>
<target name="phpdox" unless="phpdox.done" depends="phploc-ci,phpcs-ci,phpmd-ci" <target name="phpdox" unless="phpdox.done"
depends="phploc-ci,phpcs-ci,phpmd-ci"
description="Generate project documentation using phpDox"> description="Generate project documentation using phpDox">
<exec executable="${phpdox}" dir="${basedir}/build" taskname="phpdox"> <exec executable="${phpdox}" dir="${basedir}/build"
taskname="phpdox">
<arg value="--file" /> <arg value="--file" />
<arg path="${basedir}/phpdox.xml" /> <arg path="${basedir}/phpdox.xml" />
</exec> </exec>

View File

@@ -8,11 +8,13 @@
], ],
"homepage": "https://www.froxlor.org", "homepage": "https://www.froxlor.org",
"license": "GPL-2.0-or-later", "license": "GPL-2.0-or-later",
"authors" : [{ "authors": [
{
"name": "Michael Kaufmann", "name": "Michael Kaufmann",
"email": "team@froxlor.org", "email": "team@froxlor.org",
"role": "Lead Developer" "role": "Lead Developer"
}, { },
{
"name": "Robert Förster", "name": "Robert Förster",
"email": "team@froxlor.org", "email": "team@froxlor.org",
"role": "Package Maintainer" "role": "Package Maintainer"

1888
css/jquery-ui.min.css vendored

File diff suppressed because one or more lines are too long

View File

@@ -16,7 +16,6 @@
* @package Panel * @package Panel
* *
*/ */
define('AREA', 'customer'); define('AREA', 'customer');
require './lib/init.php'; require './lib/init.php';
@@ -51,9 +50,11 @@ if ($page == 'overview') {
LEFT JOIN `" . TABLE_PANEL_DOMAINS . "` `da` ON `da`.`aliasdomain`=`d`.`id` LEFT JOIN `" . TABLE_PANEL_DOMAINS . "` `da` ON `da`.`aliasdomain`=`d`.`id`
WHERE `d`.`customerid`= :customerid WHERE `d`.`customerid`= :customerid
AND `d`.`email_only`='0' AND `d`.`email_only`='0'
AND `d`.`id` <> :standardsubdomain " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit() AND `d`.`id` <> :standardsubdomain " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
); Database::pexecute($domains_stmt, array(
Database::pexecute($domains_stmt, array("customerid" => $userinfo['customerid'], "standardsubdomain" => $userinfo['standardsubdomain'])); "customerid" => $userinfo['customerid'],
"standardsubdomain" => $userinfo['standardsubdomain']
));
$paging->setEntries(Database::num_rows()); $paging->setEntries(Database::num_rows());
$sortcode = $paging->getHtmlSortCode($lng); $sortcode = $paging->getHtmlSortCode($lng);
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s); $arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
@@ -79,7 +80,9 @@ if ($page == 'overview') {
// nothing (ssl_global) // nothing (ssl_global)
$row['domain_hascert'] = 0; $row['domain_hascert'] = 0;
$ssl_stmt = Database::prepare("SELECT * FROM `" . TABLE_PANEL_DOMAIN_SSL_SETTINGS . "` WHERE `domainid` = :domainid"); $ssl_stmt = Database::prepare("SELECT * FROM `" . TABLE_PANEL_DOMAIN_SSL_SETTINGS . "` WHERE `domainid` = :domainid");
Database::pexecute($ssl_stmt, array("domainid" => $row['id'])); Database::pexecute($ssl_stmt, array(
"domainid" => $row['id']
));
$ssl_result = $ssl_stmt->fetch(PDO::FETCH_ASSOC); $ssl_result = $ssl_stmt->fetch(PDO::FETCH_ASSOC);
if (is_array($ssl_result) && isset($ssl_result['ssl_cert_file']) && $ssl_result['ssl_cert_file'] != '') { if (is_array($ssl_result) && isset($ssl_result['ssl_cert_file']) && $ssl_result['ssl_cert_file'] != '') {
// own certificate (ssl_customer_green) // own certificate (ssl_customer_green)
@@ -88,7 +91,9 @@ if ($page == 'overview') {
// check if it's parent has one set (shared) // check if it's parent has one set (shared)
if ($row['parentdomainid'] != 0) { if ($row['parentdomainid'] != 0) {
$ssl_stmt = Database::prepare("SELECT * FROM `" . TABLE_PANEL_DOMAIN_SSL_SETTINGS . "` WHERE `domainid` = :domainid"); $ssl_stmt = Database::prepare("SELECT * FROM `" . TABLE_PANEL_DOMAIN_SSL_SETTINGS . "` WHERE `domainid` = :domainid");
Database::pexecute($ssl_stmt, array("domainid" => $row['parentdomainid'])); Database::pexecute($ssl_stmt, array(
"domainid" => $row['parentdomainid']
));
$ssl_result = $ssl_stmt->fetch(PDO::FETCH_ASSOC); $ssl_result = $ssl_stmt->fetch(PDO::FETCH_ASSOC);
if (is_array($ssl_result) && isset($ssl_result['ssl_cert_file']) && $ssl_result['ssl_cert_file'] != '') { if (is_array($ssl_result) && isset($ssl_result['ssl_cert_file']) && $ssl_result['ssl_cert_file'] != '') {
// parent has a certificate (ssl_shared) // parent has a certificate (ssl_shared)
@@ -191,7 +196,9 @@ if ($page == 'overview') {
$result = json_decode($json_result, true)['data']; $result = json_decode($json_result, true)['data'];
$alias_stmt = Database::prepare("SELECT COUNT(`id`) AS `count` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `aliasdomain` = :aliasdomain"); $alias_stmt = Database::prepare("SELECT COUNT(`id`) AS `count` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `aliasdomain` = :aliasdomain");
$alias_check = Database::pexecute_first($alias_stmt, array("aliasdomain" => $id)); $alias_check = Database::pexecute_first($alias_stmt, array(
"aliasdomain" => $id
));
if (isset($result['parentdomainid']) && $result['parentdomainid'] != '0' && $alias_check['count'] == 0) { if (isset($result['parentdomainid']) && $result['parentdomainid'] != '0' && $alias_check['count'] == 0) {
if (isset($_POST['send']) && $_POST['send'] == 'send') { if (isset($_POST['send']) && $_POST['send'] == 'send') {
@@ -200,9 +207,16 @@ if ($page == 'overview') {
} catch (Exception $e) { } catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage()); \Froxlor\UI\Response::dynamic_error($e->getMessage());
} }
\Froxlor\UI\Response::redirectTo($filename, array('page' => $page, 's' => $s)); \Froxlor\UI\Response::redirectTo($filename, array(
'page' => $page,
's' => $s
));
} else { } else {
ask_yesno('domains_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $idna_convert->decode($result['domain'])); ask_yesno('domains_reallydelete', $filename, array(
'id' => $id,
'page' => $page,
'action' => $action
), $idna_convert->decode($result['domain']));
} }
} else { } else {
\Froxlor\UI\Response::standard_error('domains_cantdeletemaindomain'); \Froxlor\UI\Response::standard_error('domains_cantdeletemaindomain');
@@ -215,16 +229,20 @@ if ($page == 'overview') {
} catch (Exception $e) { } catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage()); \Froxlor\UI\Response::dynamic_error($e->getMessage());
} }
\Froxlor\UI\Response::redirectTo($filename, array('page' => $page, 's' => $s)); \Froxlor\UI\Response::redirectTo($filename, array(
'page' => $page,
's' => $s
));
} else { } else {
$stmt = Database::prepare("SELECT `id`, `domain`, `documentroot`, `ssl_redirect`,`isemaildomain`,`letsencrypt` FROM `" . TABLE_PANEL_DOMAINS . "` $stmt = Database::prepare("SELECT `id`, `domain`, `documentroot`, `ssl_redirect`,`isemaildomain`,`letsencrypt` FROM `" . TABLE_PANEL_DOMAINS . "`
WHERE `customerid` = :customerid WHERE `customerid` = :customerid
AND `parentdomainid` = '0' AND `parentdomainid` = '0'
AND `email_only` = '0' AND `email_only` = '0'
AND `caneditdomain` = '1' AND `caneditdomain` = '1'
ORDER BY `domain` ASC" ORDER BY `domain` ASC");
); Database::pexecute($stmt, array(
Database::pexecute($stmt, array("customerid" => $userinfo['customerid'])); "customerid" => $userinfo['customerid']
));
$domains = ''; $domains = '';
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) { while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
@@ -239,9 +257,10 @@ if ($page == 'overview') {
AND `d`.`customerid`=`c`.`customerid` AND `d`.`customerid`=`c`.`customerid`
AND `d`.`email_only`='0' AND `d`.`email_only`='0'
AND `d`.`customerid`= :customerid AND `d`.`customerid`= :customerid
ORDER BY `d`.`domain` ASC" ORDER BY `d`.`domain` ASC");
); Database::pexecute($domains_stmt, array(
Database::pexecute($domains_stmt, array("customerid" => $userinfo['customerid'])); "customerid" => $userinfo['customerid']
));
while ($row_domain = $domains_stmt->fetch(PDO::FETCH_ASSOC)) { while ($row_domain = $domains_stmt->fetch(PDO::FETCH_ASSOC)) {
$aliasdomains .= makeoption($idna_convert->decode($row_domain['domain']), $row_domain['id']); $aliasdomains .= makeoption($idna_convert->decode($row_domain['domain']), $row_domain['id']);
@@ -274,8 +293,7 @@ if ($page == 'overview') {
$phpconfigs = ''; $phpconfigs = '';
$has_phpconfigs = false; $has_phpconfigs = false;
if (isset($userinfo['allowed_phpconfigs']) && !empty($userinfo['allowed_phpconfigs'])) if (isset($userinfo['allowed_phpconfigs']) && ! empty($userinfo['allowed_phpconfigs'])) {
{
$has_phpconfigs = true; $has_phpconfigs = true;
$allowed_cfg = json_decode($userinfo['allowed_phpconfigs'], JSON_OBJECT_AS_ARRAY); $allowed_cfg = json_decode($userinfo['allowed_phpconfigs'], JSON_OBJECT_AS_ARRAY);
$phpconfigs_result_stmt = Database::query(" $phpconfigs_result_stmt = Database::query("
@@ -320,7 +338,10 @@ if ($page == 'overview') {
} catch (Exception $e) { } catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage()); \Froxlor\UI\Response::dynamic_error($e->getMessage());
} }
\Froxlor\UI\Response::redirectTo($filename, array('page' => $page, 's' => $s)); \Froxlor\UI\Response::redirectTo($filename, array(
'page' => $page,
's' => $s
));
} else { } else {
$result['domain'] = $idna_convert->decode($result['domain']); $result['domain'] = $idna_convert->decode($result['domain']);
@@ -338,9 +359,11 @@ if ($page == 'overview') {
IN (SELECT `id_ipandports` FROM `" . TABLE_DOMAINTOIP . "` IN (SELECT `id_ipandports` FROM `" . TABLE_DOMAINTOIP . "`
WHERE `id_domain` = :id) WHERE `id_domain` = :id)
GROUP BY `d`.`id`, `d`.`domain` GROUP BY `d`.`id`, `d`.`domain`
ORDER BY `d`.`domain` ASC" ORDER BY `d`.`domain` ASC");
); Database::pexecute($domains_stmt, array(
Database::pexecute($domains_stmt, array("id" => $result['id'], "customerid" => $userinfo['customerid'])); "id" => $result['id'],
"customerid" => $userinfo['customerid']
));
while ($row_domain = $domains_stmt->fetch(PDO::FETCH_ASSOC)) { while ($row_domain = $domains_stmt->fetch(PDO::FETCH_ASSOC)) {
$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']);
@@ -376,7 +399,9 @@ if ($page == 'overview') {
LEFT JOIN `" . TABLE_DOMAINTOIP . "` dti ON dti.id_ipandports = pip.id LEFT JOIN `" . TABLE_DOMAINTOIP . "` dti ON dti.id_ipandports = pip.id
WHERE `dti`.`id_domain` = :id_domain AND pip.`ssl`='1' WHERE `dti`.`id_domain` = :id_domain AND pip.`ssl`='1'
"); ");
Database::pexecute($ssl_ip_stmt, array("id_domain" => $result['id'])); Database::pexecute($ssl_ip_stmt, array(
"id_domain" => $result['id']
));
$resultX = $ssl_ip_stmt->fetch(PDO::FETCH_ASSOC); $resultX = $ssl_ip_stmt->fetch(PDO::FETCH_ASSOC);
if (isset($resultX['countSSL']) && (int) $resultX['countSSL'] > 0) { if (isset($resultX['countSSL']) && (int) $resultX['countSSL'] > 0) {
$ssl_ipsandports = 'notempty'; $ssl_ipsandports = 'notempty';
@@ -404,9 +429,10 @@ if ($page == 'overview') {
LEFT JOIN `" . TABLE_DOMAINTOIP . "` `dip` LEFT JOIN `" . TABLE_DOMAINTOIP . "` `dip`
ON ( `dip`.`id_ipandports` = `p`.`id` ) ON ( `dip`.`id_ipandports` = `p`.`id` )
WHERE `dip`.`id_domain` = :id_domain WHERE `dip`.`id_domain` = :id_domain
GROUP BY `p`.`ip`" GROUP BY `p`.`ip`");
); Database::pexecute($ips_stmt, array(
Database::pexecute($ips_stmt, array("id_domain" => $result['id'])); "id_domain" => $result['id']
));
$result_ipandport['ip'] = ''; $result_ipandport['ip'] = '';
while ($rowip = $ips_stmt->fetch(PDO::FETCH_ASSOC)) { while ($rowip = $ips_stmt->fetch(PDO::FETCH_ASSOC)) {
$result_ipandport['ip'] .= $rowip['ip'] . "<br />"; $result_ipandport['ip'] .= $rowip['ip'] . "<br />";
@@ -414,8 +440,7 @@ if ($page == 'overview') {
$phpconfigs = ''; $phpconfigs = '';
$has_phpconfigs = false; $has_phpconfigs = false;
if (isset($userinfo['allowed_phpconfigs']) && !empty($userinfo['allowed_phpconfigs'])) if (isset($userinfo['allowed_phpconfigs']) && ! empty($userinfo['allowed_phpconfigs'])) {
{
$has_phpconfigs = true; $has_phpconfigs = true;
$allowed_cfg = json_decode($userinfo['allowed_phpconfigs'], JSON_OBJECT_AS_ARRAY); $allowed_cfg = json_decode($userinfo['allowed_phpconfigs'], JSON_OBJECT_AS_ARRAY);
$phpconfigs_result_stmt = Database::query(" $phpconfigs_result_stmt = Database::query("
@@ -463,13 +488,17 @@ if ($page == 'overview') {
\Froxlor\UI\Response::dynamic_error($e->getMessage()); \Froxlor\UI\Response::dynamic_error($e->getMessage());
} }
// back to domain overview // back to domain overview
\Froxlor\UI\Response::redirectTo($filename, array('page' => 'domains', 's' => $s)); \Froxlor\UI\Response::redirectTo($filename, array(
'page' => 'domains',
's' => $s
));
} }
$stmt = Database::prepare("SELECT * FROM `" . TABLE_PANEL_DOMAIN_SSL_SETTINGS . "` $stmt = Database::prepare("SELECT * FROM `" . TABLE_PANEL_DOMAIN_SSL_SETTINGS . "`
WHERE `domainid`= :domainid" WHERE `domainid`= :domainid");
); $result = Database::pexecute_first($stmt, array(
$result = Database::pexecute_first($stmt, array("domainid" => $id)); "domainid" => $id
));
$do_insert = false; $do_insert = false;
// if no entry can be found, behave like we have empty values // if no entry can be found, behave like we have empty values
@@ -496,11 +525,9 @@ if ($page == 'overview') {
} elseif ($page == 'domaindnseditor' && $userinfo['dnsenabled'] == '1' && Settings::Get('system.dnsenabled') == '1') { } elseif ($page == 'domaindnseditor' && $userinfo['dnsenabled'] == '1' && Settings::Get('system.dnsenabled') == '1') {
require_once __DIR__ . '/dns_editor.php'; require_once __DIR__ . '/dns_editor.php';
} elseif ($page == 'sslcertificates') { } elseif ($page == 'sslcertificates') {
require_once __DIR__ . '/ssl_certificates.php'; require_once __DIR__ . '/ssl_certificates.php';
} elseif ($page == 'logfiles') { } elseif ($page == 'logfiles') {
require_once __DIR__ . '/logfiles_viewer.php'; require_once __DIR__ . '/logfiles_viewer.php';

View File

@@ -16,7 +16,6 @@
* @package Panel * @package Panel
* *
*/ */
define('AREA', 'customer'); define('AREA', 'customer');
require './lib/init.php'; require './lib/init.php';
@@ -52,9 +51,10 @@ if ($page == 'overview') {
$result_stmt = Database::prepare('SELECT `m`.`id`, `m`.`domainid`, `m`.`email`, `m`.`email_full`, `m`.`iscatchall`, `u`.`quota`, `m`.`destination`, `m`.`popaccountid`, `d`.`domain`, `u`.`mboxsize` FROM `' . TABLE_MAIL_VIRTUAL . '` `m` $result_stmt = Database::prepare('SELECT `m`.`id`, `m`.`domainid`, `m`.`email`, `m`.`email_full`, `m`.`iscatchall`, `u`.`quota`, `m`.`destination`, `m`.`popaccountid`, `d`.`domain`, `u`.`mboxsize` FROM `' . TABLE_MAIL_VIRTUAL . '` `m`
LEFT JOIN `' . TABLE_PANEL_DOMAINS . '` `d` ON (`m`.`domainid` = `d`.`id`) LEFT JOIN `' . TABLE_PANEL_DOMAINS . '` `d` ON (`m`.`domainid` = `d`.`id`)
LEFT JOIN `' . TABLE_MAIL_USERS . '` `u` ON (`m`.`popaccountid` = `u`.`id`) LEFT JOIN `' . TABLE_MAIL_USERS . '` `u` ON (`m`.`popaccountid` = `u`.`id`)
WHERE `m`.`customerid`= :customerid ' . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit() WHERE `m`.`customerid`= :customerid ' . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
); Database::pexecute($result_stmt, array(
Database::pexecute($result_stmt, array("customerid" => $userinfo['customerid'])); "customerid" => $userinfo['customerid']
));
$emailscount = Database::num_rows(); $emailscount = Database::num_rows();
$paging->setEntries($emailscount); $paging->setEntries($emailscount);
$sortcode = $paging->getHtmlSortCode($lng); $sortcode = $paging->getHtmlSortCode($lng);
@@ -131,9 +131,10 @@ if ($page == 'overview') {
$emaildomains_count_stmt = Database::prepare("SELECT COUNT(`id`) AS `count` FROM `" . TABLE_PANEL_DOMAINS . "` $emaildomains_count_stmt = Database::prepare("SELECT COUNT(`id`) AS `count` FROM `" . TABLE_PANEL_DOMAINS . "`
WHERE `customerid`= :customerid WHERE `customerid`= :customerid
AND `isemaildomain`='1' ORDER BY `domain` ASC" AND `isemaildomain`='1' ORDER BY `domain` ASC");
); Database::pexecute($emaildomains_count_stmt, array(
Database::pexecute($emaildomains_count_stmt, array("customerid" => $userinfo['customerid'])); "customerid" => $userinfo['customerid']
));
$emaildomains_count = $emaildomains_count_stmt->fetch(PDO::FETCH_ASSOC); $emaildomains_count = $emaildomains_count_stmt->fetch(PDO::FETCH_ASSOC);
$emaildomains_count = $emaildomains_count['count']; $emaildomains_count = $emaildomains_count['count'];
@@ -157,14 +158,21 @@ if ($page == 'overview') {
} catch (Exception $e) { } catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage()); \Froxlor\UI\Response::dynamic_error($e->getMessage());
} }
\Froxlor\UI\Response::redirectTo($filename, array('page' => $page, 's' => $s)); \Froxlor\UI\Response::redirectTo($filename, array(
'page' => $page,
's' => $s
));
} else { } else {
if ($result['popaccountid'] != '0') { if ($result['popaccountid'] != '0') {
$show_checkbox = true; $show_checkbox = true;
} else { } else {
$show_checkbox = false; $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); ask_yesno_withcheckbox('email_reallydelete', 'admin_customer_alsoremovemail', $filename, array(
'id' => $id,
'page' => $page,
'action' => $action
), $idna_convert->decode($result['email_full']), $show_checkbox);
} }
} }
} elseif ($action == 'add') { } elseif ($action == 'add') {
@@ -176,14 +184,20 @@ if ($page == 'overview') {
\Froxlor\UI\Response::dynamic_error($e->getMessage()); \Froxlor\UI\Response::dynamic_error($e->getMessage());
} }
$result = json_decode($json_result, true)['data']; $result = json_decode($json_result, true)['data'];
\Froxlor\UI\Response::redirectTo($filename, array('page' => $page, 'action' => 'edit', 'id' => $result['id'], 's' => $s)); \Froxlor\UI\Response::redirectTo($filename, array(
'page' => $page,
'action' => 'edit',
'id' => $result['id'],
's' => $s
));
} else { } else {
$result_stmt = Database::prepare("SELECT `id`, `domain`, `customerid` FROM `" . TABLE_PANEL_DOMAINS . "` $result_stmt = Database::prepare("SELECT `id`, `domain`, `customerid` FROM `" . TABLE_PANEL_DOMAINS . "`
WHERE `customerid`= :cid WHERE `customerid`= :cid
AND `isemaildomain`='1' AND `isemaildomain`='1'
ORDER BY `domain` ASC" ORDER BY `domain` ASC");
); Database::pexecute($result_stmt, array(
Database::pexecute($result_stmt, array("cid" => $userinfo['customerid'])); "cid" => $userinfo['customerid']
));
$domains = ''; $domains = '';
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) { while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
@@ -271,7 +285,12 @@ if ($page == 'overview') {
} catch (Exception $e) { } catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage()); \Froxlor\UI\Response::dynamic_error($e->getMessage());
} }
\Froxlor\UI\Response::redirectTo($filename, array('page' => $page, 'action' => 'edit', 'id' => $id, 's' => $s)); \Froxlor\UI\Response::redirectTo($filename, array(
'page' => $page,
'action' => 'edit',
'id' => $id,
's' => $s
));
} }
} elseif ($page == 'accounts') { } elseif ($page == 'accounts') {
if ($action == 'add' && $id != 0) { if ($action == 'add' && $id != 0) {
@@ -291,11 +310,18 @@ if ($page == 'overview') {
} catch (Exception $e) { } catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage()); \Froxlor\UI\Response::dynamic_error($e->getMessage());
} }
\Froxlor\UI\Response::redirectTo($filename, array('page' => 'emails', 'action' => 'edit', 'id' => $id, 's' => $s)); \Froxlor\UI\Response::redirectTo($filename, array(
'page' => 'emails',
'action' => 'edit',
'id' => $id,
's' => $s
));
} else { } else {
if (\Froxlor\Validate\Check::checkMailAccDeletionState($result['email_full'])) { if (\Froxlor\Validate\Check::checkMailAccDeletionState($result['email_full'])) {
\Froxlor\UI\Response::standard_error(array('mailaccistobedeleted'), $result['email_full']); \Froxlor\UI\Response::standard_error(array(
'mailaccistobedeleted'
), $result['email_full']);
} }
$result['email_full'] = $idna_convert->decode($result['email_full']); $result['email_full'] = $idna_convert->decode($result['email_full']);
@@ -311,11 +337,16 @@ if ($page == 'overview') {
eval("echo \"" . \Froxlor\UI\Template::getTemplate("email/account_add") . "\";"); eval("echo \"" . \Froxlor\UI\Template::getTemplate("email/account_add") . "\";");
} }
} else { } else {
\Froxlor\UI\Response::standard_error(array('allresourcesused', 'allocatetoomuchquota'), $quota); \Froxlor\UI\Response::standard_error(array(
'allresourcesused',
'allocatetoomuchquota'
), $quota);
} }
} elseif ($action == 'changepw' && $id != 0) { } elseif ($action == 'changepw' && $id != 0) {
try { try {
$json_result = Emails::getLocal($userinfo, array('id' => $id))->get(); $json_result = Emails::getLocal($userinfo, array(
'id' => $id
))->get();
} catch (Exception $e) { } catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage()); \Froxlor\UI\Response::dynamic_error($e->getMessage());
} }
@@ -328,7 +359,12 @@ if ($page == 'overview') {
} catch (Exception $e) { } catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage()); \Froxlor\UI\Response::dynamic_error($e->getMessage());
} }
\Froxlor\UI\Response::redirectTo($filename, array('page' => 'emails', 'action' => 'edit', 'id' => $id, 's' => $s)); \Froxlor\UI\Response::redirectTo($filename, array(
'page' => 'emails',
'action' => 'edit',
'id' => $id,
's' => $s
));
} else { } else {
$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);
@@ -344,7 +380,9 @@ if ($page == 'overview') {
} }
} elseif ($action == 'changequota' && Settings::Get('system.mail_quota_enabled') == '1' && $id != 0) { } elseif ($action == 'changequota' && Settings::Get('system.mail_quota_enabled') == '1' && $id != 0) {
try { try {
$json_result = Emails::getLocal($userinfo, array('id' => $id))->get(); $json_result = Emails::getLocal($userinfo, array(
'id' => $id
))->get();
} catch (Exception $e) { } catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage()); \Froxlor\UI\Response::dynamic_error($e->getMessage());
} }
@@ -357,7 +395,12 @@ if ($page == 'overview') {
} catch (Exception $e) { } catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage()); \Froxlor\UI\Response::dynamic_error($e->getMessage());
} }
\Froxlor\UI\Response::redirectTo($filename, array('page' => 'emails', 'action' => 'edit', 'id' => $id, 's' => $s)); \Froxlor\UI\Response::redirectTo($filename, array(
'page' => 'emails',
'action' => 'edit',
'id' => $id,
's' => $s
));
} else { } else {
$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);
@@ -373,7 +416,9 @@ if ($page == 'overview') {
} }
} elseif ($action == 'delete' && $id != 0) { } elseif ($action == 'delete' && $id != 0) {
try { try {
$json_result = Emails::getLocal($userinfo, array('id' => $id))->get(); $json_result = Emails::getLocal($userinfo, array(
'id' => $id
))->get();
} catch (Exception $e) { } catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage()); \Froxlor\UI\Response::dynamic_error($e->getMessage());
} }
@@ -386,9 +431,18 @@ if ($page == 'overview') {
} catch (Exception $e) { } catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage()); \Froxlor\UI\Response::dynamic_error($e->getMessage());
} }
\Froxlor\UI\Response::redirectTo($filename, array('page' => 'emails', 'action' => 'edit', 'id' => $id, 's' => $s)); \Froxlor\UI\Response::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_withcheckbox('email_reallydelete_account', 'admin_customer_alsoremovemail', $filename, array(
'id' => $id,
'page' => $page,
'action' => $action
), $idna_convert->decode($result['email_full']));
} }
} }
} }
@@ -396,7 +450,9 @@ if ($page == 'overview') {
if ($action == 'add' && $id != 0) { if ($action == 'add' && $id != 0) {
if ($userinfo['email_forwarders_used'] < $userinfo['email_forwarders'] || $userinfo['email_forwarders'] == '-1') { if ($userinfo['email_forwarders_used'] < $userinfo['email_forwarders'] || $userinfo['email_forwarders'] == '-1') {
try { try {
$json_result = Emails::getLocal($userinfo, array('id' => $id))->get(); $json_result = Emails::getLocal($userinfo, array(
'id' => $id
))->get();
} catch (Exception $e) { } catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage()); \Froxlor\UI\Response::dynamic_error($e->getMessage());
} }
@@ -409,7 +465,12 @@ if ($page == 'overview') {
} catch (Exception $e) { } catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage()); \Froxlor\UI\Response::dynamic_error($e->getMessage());
} }
\Froxlor\UI\Response::redirectTo($filename, array('page' => 'emails', 'action' => 'edit', 'id' => $id, 's' => $s)); \Froxlor\UI\Response::redirectTo($filename, array(
'page' => 'emails',
'action' => 'edit',
'id' => $id,
's' => $s
));
} else { } else {
$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);
@@ -428,7 +489,9 @@ if ($page == 'overview') {
} }
} elseif ($action == 'delete' && $id != 0) { } elseif ($action == 'delete' && $id != 0) {
try { try {
$json_result = Emails::getLocal($userinfo, array('id' => $id))->get(); $json_result = Emails::getLocal($userinfo, array(
'id' => $id
))->get();
} catch (Exception $e) { } catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage()); \Froxlor\UI\Response::dynamic_error($e->getMessage());
} }
@@ -454,9 +517,19 @@ if ($page == 'overview') {
} catch (Exception $e) { } catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage()); \Froxlor\UI\Response::dynamic_error($e->getMessage());
} }
\Froxlor\UI\Response::redirectTo($filename, array('page' => 'emails', 'action' => 'edit', 'id' => $id, 's' => $s)); \Froxlor\UI\Response::redirectTo($filename, array(
'page' => 'emails',
'action' => 'edit',
'id' => $id,
's' => $s
));
} else { } else {
ask_yesno('email_reallydelete_forwarder', $filename, array('id' => $id, 'forwarderid' => $forwarderid, 'page' => $page, 'action' => $action), $idna_convert->decode($result['email_full']) . ' -> ' . $idna_convert->decode($forwarder)); ask_yesno('email_reallydelete_forwarder', $filename, array(
'id' => $id,
'forwarderid' => $forwarderid,
'page' => $page,
'action' => $action
), $idna_convert->decode($result['email_full']) . ' -> ' . $idna_convert->decode($forwarder));
} }
} }
} }

View File

@@ -16,7 +16,6 @@
* @package Panel * @package Panel
* *
*/ */
define('AREA', 'customer'); define('AREA', 'customer');
require './lib/init.php'; require './lib/init.php';
@@ -50,9 +49,10 @@ if ($page == 'overview') {
$paging = new \Froxlor\UI\Paging($userinfo, TABLE_FTP_USERS, $fields); $paging = new \Froxlor\UI\Paging($userinfo, TABLE_FTP_USERS, $fields);
$result_stmt = Database::prepare("SELECT `id`, `username`, `description`, `homedir`, `shell` FROM `" . TABLE_FTP_USERS . "` $result_stmt = Database::prepare("SELECT `id`, `username`, `description`, `homedir`, `shell` FROM `" . TABLE_FTP_USERS . "`
WHERE `customerid`= :customerid " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit() WHERE `customerid`= :customerid " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
); Database::pexecute($result_stmt, array(
Database::pexecute($result_stmt, array("customerid" => $userinfo['customerid'])); "customerid" => $userinfo['customerid']
));
$ftps_count = Database::num_rows(); $ftps_count = Database::num_rows();
$paging->setEntries($ftps_count); $paging->setEntries($ftps_count);
$sortcode = $paging->getHtmlSortCode($lng); $sortcode = $paging->getHtmlSortCode($lng);
@@ -99,9 +99,16 @@ if ($page == 'overview') {
} catch (Exception $e) { } catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage()); \Froxlor\UI\Response::dynamic_error($e->getMessage());
} }
\Froxlor\UI\Response::redirectTo($filename, array('page' => $page, 's' => $s)); \Froxlor\UI\Response::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_withcheckbox('ftp_reallydelete', 'admin_customer_alsoremoveftphomedir', $filename, array(
'id' => $id,
'page' => $page,
'action' => $action
), $result['username']);
} }
} else { } else {
\Froxlor\UI\Response::standard_error('ftp_cantdeletemainaccount'); \Froxlor\UI\Response::standard_error('ftp_cantdeletemainaccount');
@@ -114,7 +121,10 @@ if ($page == 'overview') {
} catch (Exception $e) { } catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage()); \Froxlor\UI\Response::dynamic_error($e->getMessage());
} }
\Froxlor\UI\Response::redirectTo($filename, array('page' => $page, 's' => $s)); \Froxlor\UI\Response::redirectTo($filename, array(
'page' => $page,
's' => $s
));
} else { } else {
$pathSelect = \Froxlor\FileDir::makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], '/'); $pathSelect = \Froxlor\FileDir::makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], '/');
@@ -123,9 +133,10 @@ if ($page == 'overview') {
$domains = ''; $domains = '';
$result_domains_stmt = Database::prepare("SELECT `domain` FROM `" . TABLE_PANEL_DOMAINS . "` $result_domains_stmt = Database::prepare("SELECT `domain` FROM `" . TABLE_PANEL_DOMAINS . "`
WHERE `customerid`= :customerid" WHERE `customerid`= :customerid");
); Database::pexecute($result_domains_stmt, array(
Database::pexecute($result_domains_stmt, array("customerid" => $userinfo['customerid'])); "customerid" => $userinfo['customerid']
));
while ($row_domain = $result_domains_stmt->fetch(PDO::FETCH_ASSOC)) { while ($row_domain = $result_domains_stmt->fetch(PDO::FETCH_ASSOC)) {
$domainlist[] = $row_domain['domain']; $domainlist[] = $row_domain['domain'];
@@ -180,7 +191,10 @@ if ($page == 'overview') {
} catch (Exception $e) { } catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage()); \Froxlor\UI\Response::dynamic_error($e->getMessage());
} }
\Froxlor\UI\Response::redirectTo($filename, array('page' => $page, 's' => $s)); \Froxlor\UI\Response::redirectTo($filename, array(
'page' => $page,
's' => $s
));
} else { } else {
if (strpos($result['homedir'], $userinfo['documentroot']) === 0) { if (strpos($result['homedir'], $userinfo['documentroot']) === 0) {
$homedir = str_replace($userinfo['documentroot'], "/", $result['homedir']); $homedir = str_replace($userinfo['documentroot'], "/", $result['homedir']);
@@ -195,9 +209,10 @@ if ($page == 'overview') {
$domains = ''; $domains = '';
$result_domains_stmt = Database::prepare("SELECT `domain` FROM `" . TABLE_PANEL_DOMAINS . "` $result_domains_stmt = Database::prepare("SELECT `domain` FROM `" . TABLE_PANEL_DOMAINS . "`
WHERE `customerid` = :customerid" WHERE `customerid` = :customerid");
); Database::pexecute($result_domains_stmt, array(
Database::pexecute($result_domains_stmt, array("customerid" => $userinfo['customerid'])); "customerid" => $userinfo['customerid']
));
while ($row_domain = $result_domains_stmt->fetch(PDO::FETCH_ASSOC)) { while ($row_domain = $result_domains_stmt->fetch(PDO::FETCH_ASSOC)) {
$domains .= makeoption($idna_convert->decode($row_domain['domain']), $row_domain['domain']); $domains .= makeoption($idna_convert->decode($row_domain['domain']), $row_domain['domain']);

View File

@@ -16,7 +16,6 @@
* @package Panel * @package Panel
* *
*/ */
define('AREA', 'customer'); define('AREA', 'customer');
require './lib/init.php'; require './lib/init.php';
@@ -27,19 +26,19 @@ use Froxlor\Api\Commands\Customers as Customers;
if ($action == 'logout') { if ($action == 'logout') {
$log->logAction(USR_ACTION, LOG_NOTICE, 'logged out'); $log->logAction(USR_ACTION, LOG_NOTICE, 'logged out');
$params = array("customerid" => $userinfo['customerid']); $params = array(
"customerid" => $userinfo['customerid']
);
if (Settings::Get('session.allow_multiple_login') == '1') { if (Settings::Get('session.allow_multiple_login') == '1') {
$stmt = Database::prepare("DELETE FROM `" . TABLE_PANEL_SESSIONS . "` $stmt = Database::prepare("DELETE FROM `" . TABLE_PANEL_SESSIONS . "`
WHERE `userid` = :customerid WHERE `userid` = :customerid
AND `adminsession` = '0' AND `adminsession` = '0'
AND `hash` = :hash" AND `hash` = :hash");
);
$params["hash"] = $s; $params["hash"] = $s;
} else { } else {
$stmt = Database::prepare("DELETE FROM `" . TABLE_PANEL_SESSIONS . "` $stmt = Database::prepare("DELETE FROM `" . TABLE_PANEL_SESSIONS . "`
WHERE `userid` = :customerid WHERE `userid` = :customerid
AND `adminsession` = '0'" AND `adminsession` = '0'");
);
} }
Database::pexecute($stmt, $params); Database::pexecute($stmt, $params);
@@ -54,7 +53,10 @@ if ($page == 'overview') {
AND `parentdomainid` = '0' AND `parentdomainid` = '0'
AND `id` <> :standardsubdomain AND `id` <> :standardsubdomain
"); ");
Database::pexecute($domain_stmt, array("customerid" => $userinfo['customerid'], "standardsubdomain" => $userinfo['standardsubdomain'])); Database::pexecute($domain_stmt, array(
"customerid" => $userinfo['customerid'],
"standardsubdomain" => $userinfo['standardsubdomain']
));
$domains = ''; $domains = '';
$domainArray = array(); $domainArray = array();
@@ -74,7 +76,10 @@ if ($page == 'overview') {
WHERE `customerid` = :customerid WHERE `customerid` = :customerid
AND `id` = :standardsubdomain AND `id` = :standardsubdomain
"); ");
$std_domain = Database::pexecute_first($std_domain_stmt, array("customerid" => $userinfo['customerid'], "standardsubdomain" => $userinfo['standardsubdomain'])); $std_domain = Database::pexecute_first($std_domain_stmt, array(
"customerid" => $userinfo['customerid'],
"standardsubdomain" => $userinfo['standardsubdomain']
));
$stdsubdomain = $std_domain['domain']; $stdsubdomain = $std_domain['domain'];
} }
@@ -84,7 +89,9 @@ if ($page == 'overview') {
// get disk-space usages for web, mysql and mail // get disk-space usages for web, mysql and mail
$usages_stmt = Database::prepare("SELECT * FROM `" . TABLE_PANEL_DISKSPACE . "` WHERE `customerid` = :cid ORDER BY `stamp` DESC LIMIT 1"); $usages_stmt = Database::prepare("SELECT * FROM `" . TABLE_PANEL_DISKSPACE . "` WHERE `customerid` = :cid ORDER BY `stamp` DESC LIMIT 1");
$usages = Database::pexecute_first($usages_stmt, array('cid' => $userinfo['customerid'])); $usages = Database::pexecute_first($usages_stmt, array(
'cid' => $userinfo['customerid']
));
$userinfo['diskspace'] = round($userinfo['diskspace'] / 1024, Settings::Get('panel.decimal_places')); $userinfo['diskspace'] = round($userinfo['diskspace'] / 1024, Settings::Get('panel.decimal_places'));
$userinfo['diskspace_used'] = round($usages['webspace'] / 1024, Settings::Get('panel.decimal_places')); $userinfo['diskspace_used'] = round($usages['webspace'] / 1024, Settings::Get('panel.decimal_places'));
@@ -99,10 +106,14 @@ if ($page == 'overview') {
$services_enabled = ""; $services_enabled = "";
$se = array(); $se = array();
if ($userinfo['imap'] == '1') $se[] = "IMAP"; if ($userinfo['imap'] == '1')
if ($userinfo['pop3'] == '1') $se[] = "POP3"; $se[] = "IMAP";
if ($userinfo['phpenabled'] == '1') $se[] = "PHP"; if ($userinfo['pop3'] == '1')
if ($userinfo['perlenabled'] == '1') $se[] = "Perl/CGI"; $se[] = "POP3";
if ($userinfo['phpenabled'] == '1')
$se[] = "PHP";
if ($userinfo['perlenabled'] == '1')
$se[] = "Perl/CGI";
$services_enabled = implode(", ", $se); $services_enabled = implode(", ", $se);
eval("echo \"" . \Froxlor\UI\Template::getTemplate('index/index') . "\";"); eval("echo \"" . \Froxlor\UI\Template::getTemplate('index/index') . "\";");
@@ -117,17 +128,29 @@ if ($page == 'overview') {
$new_password_confirm = validatePassword($_POST['new_password_confirm'], 'new password confirm'); $new_password_confirm = validatePassword($_POST['new_password_confirm'], 'new password confirm');
if ($old_password == '') { if ($old_password == '') {
\Froxlor\UI\Response::standard_error(array('stringisempty', 'oldpassword')); \Froxlor\UI\Response::standard_error(array(
'stringisempty',
'oldpassword'
));
} elseif ($new_password == '') { } elseif ($new_password == '') {
\Froxlor\UI\Response::standard_error(array('stringisempty', 'newpassword')); \Froxlor\UI\Response::standard_error(array(
'stringisempty',
'newpassword'
));
} elseif ($new_password_confirm == '') { } elseif ($new_password_confirm == '') {
\Froxlor\UI\Response::standard_error(array('stringisempty', 'newpasswordconfirm')); \Froxlor\UI\Response::standard_error(array(
'stringisempty',
'newpasswordconfirm'
));
} elseif ($new_password != $new_password_confirm) { } elseif ($new_password != $new_password_confirm) {
\Froxlor\UI\Response::standard_error('newpasswordconfirmerror'); \Froxlor\UI\Response::standard_error('newpasswordconfirmerror');
} else { } else {
// Update user password // Update user password
try { try {
Customers::getLocal($userinfo, array('id' => $userinfo['customerid'], 'new_customer_password' => $new_password))->update(); Customers::getLocal($userinfo, array(
'id' => $userinfo['customerid'],
'new_customer_password' => $new_password
))->update();
} catch (Exception $e) { } catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage()); \Froxlor\UI\Response::dynamic_error($e->getMessage());
} }
@@ -139,8 +162,7 @@ if ($page == 'overview') {
$stmt = Database::prepare("UPDATE `" . TABLE_FTP_USERS . "` $stmt = Database::prepare("UPDATE `" . TABLE_FTP_USERS . "`
SET `password` = :password SET `password` = :password
WHERE `customerid` = :customerid WHERE `customerid` = :customerid
AND `username` = :username" AND `username` = :username");
);
$params = array( $params = array(
"password" => $cryptPassword, "password" => $cryptPassword,
"customerid" => $userinfo['customerid'], "customerid" => $userinfo['customerid'],
@@ -162,8 +184,7 @@ if ($page == 'overview') {
$stmt = Database::prepare("UPDATE `" . TABLE_PANEL_HTPASSWDS . "` $stmt = Database::prepare("UPDATE `" . TABLE_PANEL_HTPASSWDS . "`
SET `password` = :password SET `password` = :password
WHERE `customerid` = :customerid WHERE `customerid` = :customerid
AND `username` = :username" AND `username` = :username");
);
$params = array( $params = array(
"password" => $new_webalizer_password, "password" => $new_webalizer_password,
"customerid" => $userinfo['customerid'], "customerid" => $userinfo['customerid'],
@@ -172,7 +193,9 @@ if ($page == 'overview') {
Database::pexecute($stmt, $params); Database::pexecute($stmt, $params);
} }
\Froxlor\UI\Response::redirectTo($filename, array('s' => $s)); \Froxlor\UI\Response::redirectTo($filename, array(
's' => $s
));
} }
} else { } else {
eval("echo \"" . \Froxlor\UI\Template::getTemplate('index/change_password') . "\";"); eval("echo \"" . \Froxlor\UI\Template::getTemplate('index/change_password') . "\";");
@@ -182,7 +205,10 @@ if ($page == 'overview') {
$def_language = validate($_POST['def_language'], 'default language'); $def_language = validate($_POST['def_language'], 'default language');
if (isset($languages[$def_language])) { if (isset($languages[$def_language])) {
try { try {
Customers::getLocal($userinfo, array('id' => $userinfo['customerid'], 'def_language' => $def_language))->update(); Customers::getLocal($userinfo, array(
'id' => $userinfo['customerid'],
'def_language' => $def_language
))->update();
} catch (Exception $e) { } catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage()); \Froxlor\UI\Response::dynamic_error($e->getMessage());
} }
@@ -190,12 +216,16 @@ if ($page == 'overview') {
// also update current session // also update current session
$stmt = Database::prepare("UPDATE `" . TABLE_PANEL_SESSIONS . "` $stmt = Database::prepare("UPDATE `" . TABLE_PANEL_SESSIONS . "`
SET `language` = :lang SET `language` = :lang
WHERE `hash` = :hash" WHERE `hash` = :hash");
); Database::pexecute($stmt, array(
Database::pexecute($stmt, array("lang" => $def_language, "hash" => $s)); "lang" => $def_language,
"hash" => $s
));
} }
$log->logAction(USR_ACTION, LOG_NOTICE, "changed default language to '" . $def_language . "'"); $log->logAction(USR_ACTION, LOG_NOTICE, "changed default language to '" . $def_language . "'");
\Froxlor\UI\Response::redirectTo($filename, array('s' => $s)); \Froxlor\UI\Response::redirectTo($filename, array(
's' => $s
));
} else { } else {
$default_lang = Settings::Get('panel.standardlanguage'); $default_lang = Settings::Get('panel.standardlanguage');
if ($userinfo['def_language'] != '') { if ($userinfo['def_language'] != '') {
@@ -213,7 +243,10 @@ if ($page == 'overview') {
if (isset($_POST['send']) && $_POST['send'] == 'send') { if (isset($_POST['send']) && $_POST['send'] == 'send') {
$theme = validate($_POST['theme'], 'theme'); $theme = validate($_POST['theme'], 'theme');
try { try {
Customers::getLocal($userinfo, array('id' => $userinfo['customerid'], 'theme' => $theme))->update(); Customers::getLocal($userinfo, array(
'id' => $userinfo['customerid'],
'theme' => $theme
))->update();
} catch (Exception $e) { } catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage()); \Froxlor\UI\Response::dynamic_error($e->getMessage());
} }
@@ -221,12 +254,16 @@ if ($page == 'overview') {
// also update current session // also update current session
$stmt = Database::prepare("UPDATE `" . TABLE_PANEL_SESSIONS . "` $stmt = Database::prepare("UPDATE `" . TABLE_PANEL_SESSIONS . "`
SET `theme` = :theme SET `theme` = :theme
WHERE `hash` = :hash" WHERE `hash` = :hash");
); Database::pexecute($stmt, array(
Database::pexecute($stmt, array("theme" => $theme, "hash" => $s)); "theme" => $theme,
"hash" => $s
));
$log->logAction(USR_ACTION, LOG_NOTICE, "changed default theme to '" . $theme . "'"); $log->logAction(USR_ACTION, LOG_NOTICE, "changed default theme to '" . $theme . "'");
\Froxlor\UI\Response::redirectTo($filename, array('s' => $s)); \Froxlor\UI\Response::redirectTo($filename, array(
's' => $s
));
} else { } else {
$default_theme = Settings::Get('panel.default_theme'); $default_theme = Settings::Get('panel.default_theme');
if ($userinfo['theme'] != '') { if ($userinfo['theme'] != '') {
@@ -241,7 +278,6 @@ if ($page == 'overview') {
eval("echo \"" . \Froxlor\UI\Template::getTemplate('index/change_theme') . "\";"); eval("echo \"" . \Froxlor\UI\Template::getTemplate('index/change_theme') . "\";");
} }
} elseif ($page == 'send_error_report' && Settings::Get('system.allow_error_report_customer') == '1') { } elseif ($page == 'send_error_report' && Settings::Get('system.allow_error_report_customer') == '1') {
// only show this if we really have an exception to report // only show this if we really have an exception to report
@@ -279,9 +315,7 @@ if ($page == 'overview') {
$mail_html = str_replace("\n", "<br />", $mail_body); $mail_html = str_replace("\n", "<br />", $mail_body);
// send actual report to dev-team // send actual report to dev-team
if (isset($_POST['send']) if (isset($_POST['send']) && $_POST['send'] == 'send') {
&& $_POST['send'] == 'send'
) {
// send mail and say thanks // send mail and say thanks
$_mailerror = false; $_mailerror = false;
try { try {
@@ -305,22 +339,25 @@ if ($page == 'overview') {
// finally remove error from fs // finally remove error from fs
@unlink($err_file); @unlink($err_file);
\Froxlor\UI\Response::redirectTo($filename, array('s' => $s)); \Froxlor\UI\Response::redirectTo($filename, array(
's' => $s
));
} }
// show a nice summary of the error-report // show a nice summary of the error-report
// before actually sending anything // before actually sending anything
eval("echo \"" . \Froxlor\UI\Template::getTemplate("index/send_error_report") . "\";"); eval("echo \"" . \Froxlor\UI\Template::getTemplate("index/send_error_report") . "\";");
} else { } else {
\Froxlor\UI\Response::redirectTo($filename, array('s' => $s)); \Froxlor\UI\Response::redirectTo($filename, array(
's' => $s
));
} }
} else { } else {
\Froxlor\UI\Response::redirectTo($filename, array('s' => $s)); \Froxlor\UI\Response::redirectTo($filename, array(
's' => $s
));
} }
} } elseif ($page == 'apikeys' && Settings::Get('api.enabled') == 1) {
elseif ($page == 'apikeys' && Settings::Get('api.enabled') == 1) {
require_once __DIR__ . '/api_keys.php'; require_once __DIR__ . '/api_keys.php';
} } elseif ($page == 'apihelp' && Settings::Get('api.enabled') == 1) {
elseif ($page == 'apihelp' && Settings::Get('api.enabled') == 1) {
require_once __DIR__ . '/apihelp.php'; require_once __DIR__ . '/apihelp.php';
} }

View File

@@ -16,7 +16,6 @@
* @package Panel * @package Panel
* *
*/ */
define('AREA', 'customer'); define('AREA', 'customer');
require './lib/init.php'; require './lib/init.php';
@@ -56,9 +55,10 @@ if ($page == 'overview') {
); );
$paging = new \Froxlor\UI\Paging($userinfo, TABLE_PANEL_DATABASES, $fields); $paging = new \Froxlor\UI\Paging($userinfo, TABLE_PANEL_DATABASES, $fields);
$result_stmt = Database::prepare("SELECT * FROM `" . TABLE_PANEL_DATABASES . "` $result_stmt = Database::prepare("SELECT * FROM `" . TABLE_PANEL_DATABASES . "`
WHERE `customerid`= :customerid " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit() WHERE `customerid`= :customerid " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
); Database::pexecute($result_stmt, array(
Database::pexecute($result_stmt, array("customerid" => $userinfo['customerid'])); "customerid" => $userinfo['customerid']
));
$mysqls_count = Database::num_rows(); $mysqls_count = Database::num_rows();
$paging->setEntries($mysqls_count); $paging->setEntries($mysqls_count);
@@ -81,9 +81,10 @@ if ($page == 'overview') {
$row = htmlentities_array($row); $row = htmlentities_array($row);
$mbdata_stmt = Database::prepare("SELECT SUM(data_length + index_length) as MB FROM information_schema.TABLES $mbdata_stmt = Database::prepare("SELECT SUM(data_length + index_length) as MB FROM information_schema.TABLES
WHERE table_schema = :table_schema WHERE table_schema = :table_schema
GROUP BY table_schema" GROUP BY table_schema");
); Database::pexecute($mbdata_stmt, array(
Database::pexecute($mbdata_stmt, array("table_schema" => $row['databasename'])); "table_schema" => $row['databasename']
));
$mbdata = $mbdata_stmt->fetch(PDO::FETCH_ASSOC); $mbdata = $mbdata_stmt->fetch(PDO::FETCH_ASSOC);
$row['size'] = \Froxlor\PhpHelper::size_readable($mbdata['MB'], 'GiB', 'bi', '%01.' . (int) Settings::Get('panel.decimal_places') . 'f %s'); $row['size'] = \Froxlor\PhpHelper::size_readable($mbdata['MB'], 'GiB', 'bi', '%01.' . (int) Settings::Get('panel.decimal_places') . 'f %s');
eval("\$mysqls.=\"" . \Froxlor\UI\Template::getTemplate('mysql/mysqls_database') . "\";"); eval("\$mysqls.=\"" . \Froxlor\UI\Template::getTemplate('mysql/mysqls_database') . "\";");
@@ -95,7 +96,6 @@ if ($page == 'overview') {
// End root-session // End root-session
eval("echo \"" . \Froxlor\UI\Template::getTemplate('mysql/mysqls') . "\";"); eval("echo \"" . \Froxlor\UI\Template::getTemplate('mysql/mysqls') . "\";");
} elseif ($action == 'delete' && $id != 0) { } elseif ($action == 'delete' && $id != 0) {
try { try {
@@ -124,13 +124,20 @@ if ($page == 'overview') {
} catch (Exception $e) { } catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage()); \Froxlor\UI\Response::dynamic_error($e->getMessage());
} }
\Froxlor\UI\Response::redirectTo($filename, array('page' => $page, 's' => $s)); \Froxlor\UI\Response::redirectTo($filename, array(
'page' => $page,
's' => $s
));
} else { } else {
$dbnamedesc = $result['databasename']; $dbnamedesc = $result['databasename'];
if (isset($result['description']) && $result['description'] != '') { if (isset($result['description']) && $result['description'] != '') {
$dbnamedesc .= ' (' . $result['description'] . ')'; $dbnamedesc .= ' (' . $result['description'] . ')';
} }
ask_yesno('mysql_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $dbnamedesc); ask_yesno('mysql_reallydelete', $filename, array(
'id' => $id,
'page' => $page,
'action' => $action
), $dbnamedesc);
} }
} }
} elseif ($action == 'add') { } elseif ($action == 'add') {
@@ -141,7 +148,10 @@ if ($page == 'overview') {
} catch (Exception $e) { } catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage()); \Froxlor\UI\Response::dynamic_error($e->getMessage());
} }
\Froxlor\UI\Response::redirectTo($filename, array('page' => $page, 's' => $s)); \Froxlor\UI\Response::redirectTo($filename, array(
'page' => $page,
's' => $s
));
} else { } else {
$dbservers_stmt = Database::query("SELECT DISTINCT `dbserver` FROM `" . TABLE_PANEL_DATABASES . "`"); $dbservers_stmt = Database::query("SELECT DISTINCT `dbserver` FROM `" . TABLE_PANEL_DATABASES . "`");
@@ -182,7 +192,10 @@ if ($page == 'overview') {
} catch (Exception $e) { } catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage()); \Froxlor\UI\Response::dynamic_error($e->getMessage());
} }
\Froxlor\UI\Response::redirectTo($filename, array('page' => $page, 's' => $s)); \Froxlor\UI\Response::redirectTo($filename, array(
'page' => $page,
's' => $s
));
} else { } else {
$dbservers_stmt = Database::query("SELECT COUNT(DISTINCT `dbserver`) as numservers FROM `" . TABLE_PANEL_DATABASES . "`"); $dbservers_stmt = Database::query("SELECT COUNT(DISTINCT `dbserver`) as numservers FROM `" . TABLE_PANEL_DATABASES . "`");

View File

@@ -16,7 +16,6 @@
* @package Panel * @package Panel
* *
*/ */
define('AREA', 'customer'); define('AREA', 'customer');
$intrafficpage = 1; $intrafficpage = 1;
require './lib/init.php'; require './lib/init.php';
@@ -39,8 +38,7 @@ if (isset($_POST['month']) && isset($_POST['year'])) {
} elseif (isset($_GET['month']) && isset($_GET['year'])) { } elseif (isset($_GET['month']) && isset($_GET['year'])) {
$month = intval($_GET['month']); $month = intval($_GET['month']);
$year = intval($_GET['year']); $year = intval($_GET['year']);
} } // BAM! $_GET???
//BAM! $_GET???
elseif (isset($_GET['page']) && $_GET['page'] == 'current') { elseif (isset($_GET['page']) && $_GET['page'] == 'current') {
if (date('d') != '01') { if (date('d') != '01') {
$month = date('m'); $month = date('m');
@@ -64,8 +62,7 @@ if (!is_null($month) && !is_null($year)) {
AND `month` = :month AND `month` = :month
AND `year` = :year AND `year` = :year
GROUP BY `day` GROUP BY `day`
ORDER BY `day` DESC" ORDER BY `day` DESC");
);
$params = array( $params = array(
"customerid" => $userinfo['customerid'], "customerid" => $userinfo['customerid'],
"month" => $month, "month" => $month,
@@ -119,9 +116,10 @@ if (!is_null($month) && !is_null($year)) {
FROM `" . TABLE_PANEL_TRAFFIC . "` FROM `" . TABLE_PANEL_TRAFFIC . "`
WHERE `customerid` = :customerid WHERE `customerid` = :customerid
GROUP BY `year` DESC, `month` DESC GROUP BY `year` DESC, `month` DESC
LIMIT 12" LIMIT 12");
); Database::pexecute($result_stmt, array(
Database::pexecute($result_stmt, array("customerid" => $userinfo['customerid'])); "customerid" => $userinfo['customerid']
));
$traffic_complete['http'] = 0; $traffic_complete['http'] = 0;
$traffic_complete['ftp'] = 0; $traffic_complete['ftp'] = 0;
$traffic_complete['mail'] = 0; $traffic_complete['mail'] = 0;

View File

@@ -1,7 +1,7 @@
<?php <?php
if (! defined('AREA')) { if (! defined('AREA')) {
header("Location: index.php"); header("Location: index.php");
exit; exit();
} }
/** /**

View File

@@ -15,7 +15,6 @@
* @package Install * @package Install
* *
*/ */
require 'lib/class.FroxlorInstall.php'; require 'lib/class.FroxlorInstall.php';
$frxinstall = new FroxlorInstall(); $frxinstall = new FroxlorInstall();

View File

@@ -1132,8 +1132,7 @@ class FroxlorInstall
} }
// require chosen language if not english // require chosen language if not english
if ($this->_activelng != $standardlanguage) if ($this->_activelng != $standardlanguage) {
{
$lngfile = $this->_basepath . '/install/lng/' . $this->_activelng . '.lng.php'; $lngfile = $this->_basepath . '/install/lng/' . $this->_activelng . '.lng.php';
if (file_exists($lngfile)) { if (file_exists($lngfile)) {
// includes file /lng/$language.lng.php if it exists // includes file /lng/$language.lng.php if it exists

View File

@@ -16,7 +16,6 @@
* @package Language * @package Language
* *
*/ */
$lng['requirements']['title'] = 'Checking system requirements...'; $lng['requirements']['title'] = 'Checking system requirements...';
$lng['requirements']['installed'] = 'installed'; $lng['requirements']['installed'] = 'installed';
$lng['requirements']['not_true'] = 'no'; $lng['requirements']['not_true'] = 'no';

View File

@@ -16,7 +16,6 @@
* @package Language * @package Language
* *
*/ */
$lng['requirements']['title'] = 'Vérification des prérequis système...'; $lng['requirements']['title'] = 'Vérification des prérequis système...';
$lng['requirements']['installed'] = 'installé'; $lng['requirements']['installed'] = 'installé';
$lng['requirements']['not_true'] = 'non'; $lng['requirements']['not_true'] = 'non';

View File

@@ -16,7 +16,6 @@
* @package Language * @package Language
* *
*/ */
$lng['requirements']['title'] = 'Prüfe Systemvoraussetzungen...'; $lng['requirements']['title'] = 'Prüfe Systemvoraussetzungen...';
$lng['requirements']['installed'] = 'installiert'; $lng['requirements']['installed'] = 'installiert';
$lng['requirements']['not_true'] = 'nein'; $lng['requirements']['not_true'] = 'nein';

View File

@@ -1,16 +1,44 @@
@charset "UTF-8"; @charset "UTF-8";
/* RESET */ /* RESET */
html,body,div,ul,ol,li,dl,dt,dd,h1,h2,h3,h4,h5,h6,pre,form,p,blockquote,fieldset,input { margin:0; padding:0; } html, body, div, ul, ol, li, dl, dt, dd, h1, h2, h3, h4, h5, h6, pre,
h1,h2,h3,h4,h5,h6,pre,code,address,caption,cite,code,em,strong,th { font-size:1em; font-weight:400; font-style:normal; } form, p, blockquote, fieldset, input {
ul,ol { list-style:none; } margin: 0;
fieldset,img { border:none; } padding: 0;
caption,th { text-align:left; } }
table { border-collapse:collapse; border-spacing:0; }
article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section { display:block; } h1, h2, h3, h4, h5, h6, pre, code, address, caption, cite, code, em,
strong, th {
font-size: 1em;
font-weight: 400;
font-style: normal;
}
ul, ol {
list-style: none;
}
fieldset, img {
border: none;
}
caption, th {
text-align: left;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
article, aside, details, figcaption, figure, footer, header, hgroup,
menu, nav, section {
display: block;
}
/* TYPE */ /* TYPE */
html, body { html, body {
font:12px/18px 'Lucida Grande','Lucida Sans Unicode',Helvetica,Arial,Verdana,sans-serif; font: 12px/18px 'Lucida Grande', 'Lucida Sans Unicode', Helvetica, Arial,
Verdana, sans-serif;
background-color: #f5f5f5; background-color: #f5f5f5;
color: #444; color: #444;
-webkit-font-smoothing: subpixel-antialiased; -webkit-font-smoothing: subpixel-antialiased;
@@ -48,7 +76,6 @@ h3 {
font-size: 15px; font-size: 15px;
} }
img { img {
border: 0; border: 0;
vertical-align: middle; vertical-align: middle;
@@ -186,7 +213,8 @@ p.submit {
* error message display * error message display
*/ */
.errorcontainer { .errorcontainer {
background:url(../img/icons/error_big.png) 10px center no-repeat #ffedef; background: url(../img/icons/error_big.png) 10px center no-repeat
#ffedef;
border: 1px solid #ffc2ca; border: 1px solid #ffc2ca;
padding: 10px 10px 10px 68px !important; padding: 10px 10px 10px 68px !important;
margin: 10px 0 10px 0 !important; margin: 10px 0 10px 0 !important;
@@ -209,7 +237,8 @@ p.submit {
* warning message display * warning message display
*/ */
.warningcontainer, .ui-dialog { .warningcontainer, .ui-dialog {
background:url(../img/icons/warning_big.png) 10px center no-repeat #fffecc; background: url(../img/icons/warning_big.png) 10px center no-repeat
#fffecc;
border: 1px solid #f3c37e; border: 1px solid #f3c37e;
padding: 10px 10px 10px 68px !important; padding: 10px 10px 10px 68px !important;
margin: 10px 0 10px 0 !important; margin: 10px 0 10px 0 !important;
@@ -217,6 +246,7 @@ p.submit {
overflow: hidden; overflow: hidden;
box-shadow: 0 0 0 black; box-shadow: 0 0 0 black;
} }
.ui-dialog { .ui-dialog {
padding: 10px !important; padding: 10px !important;
} }
@@ -326,6 +356,7 @@ table thead th, table th {
background-color: #e9edf0; background-color: #e9edf0;
font-weight: bold; font-weight: bold;
} }
table thead:first-child th, table:first-child th { table thead:first-child th, table:first-child th {
border-top: none !important; border-top: none !important;
} }
@@ -333,16 +364,21 @@ table thead:first-child th, table:first-child th {
table th { table th {
border-top: 0; border-top: 0;
} }
th a:hover { th a:hover {
text-decoration: none; text-decoration: none;
} }
th a img { th a img {
} }
th a:nth-child(odd) img { th a:nth-child(odd) img {
position: relative; position: relative;
top: -5px; top: -5px;
left: 4px; left: 4px;
} }
th a:nth-child(even) img { th a:nth-child(even) img {
position: relative; position: relative;
top: 3px; top: 3px;
@@ -360,6 +396,7 @@ table thead:first-child th {
table tbody td { table tbody td {
border-bottom: 1px dotted #ccc; border-bottom: 1px dotted #ccc;
} }
table tbody tr:last-child td { table tbody tr:last-child td {
border-bottom: 0; border-bottom: 0;
} }
@@ -443,43 +480,54 @@ input[type="button"],input[type="submit"],input[type="reset"] {
height: 26px; height: 26px;
background-image: none; background-image: none;
} }
.loginsec input[type="button"], .loginsec input[type="submit"], .loginsec input[type="reset"] {
.loginsec input[type="button"], .loginsec input[type="submit"],
.loginsec input[type="reset"] {
margin: 0 1px; margin: 0 1px;
} }
input[type="button"]:hover,input[type="submit"]:hover,input[type="reset"]:hover {
input[type="button"]:hover, input[type="submit"]:hover, input[type="reset"]:hover
{
color: #333; color: #333;
background-color: #dcdcdc; background-color: #dcdcdc;
} }
input[type="button"]:active,input[type="submit"]:active,input[type="reset"]:active {
input[type="button"]:active, input[type="submit"]:active, input[type="reset"]:active
{
-webkit-box-shadow: inset 0 1px 8px rgba(0, 0, 0, 0.25); -webkit-box-shadow: inset 0 1px 8px rgba(0, 0, 0, 0.25);
-moz-box-shadow: inset 0 1px 8px rgba(0, 0, 0, 0.25); -moz-box-shadow: inset 0 1px 8px rgba(0, 0, 0, 0.25);
box-shadow: inset 0 1px 8px rgba(0, 0, 0, 0.25); box-shadow: inset 0 1px 8px rgba(0, 0, 0, 0.25);
color: white !important; color: white !important;
} }
input[type="submit"], input[class="yesbutton"] { input[type="submit"], input[class="yesbutton"] {
color: white; color: white;
background-color: #35aa47; background-color: #35aa47;
} }
input[type="submit"]:hover, input[class="yesbutton"]:hover { input[type="submit"]:hover, input[class="yesbutton"]:hover {
color: white; color: white;
background-color: #1d943b; background-color: #1d943b;
} }
input[class="submit"]:active, input[class="yesbutton"]:active { input[class="submit"]:active, input[class="yesbutton"]:active {
background-color: #35aa47; background-color: #35aa47;
} }
input[class="nobutton"], input[type="reset"] { input[class="nobutton"], input[type="reset"] {
color: white; color: white;
background-color: #d84a38; background-color: #d84a38;
} }
input[class="nobutton"]:hover, input[type="reset"]:hover { input[class="nobutton"]:hover, input[type="reset"]:hover {
color: white; color: white;
background-color: #c53727; background-color: #c53727;
} }
input[class="nobutton"]:active, input[type="reset"]:active { input[class="nobutton"]:active, input[type="reset"]:active {
background-color: #dd4b39; background-color: #dd4b39;
} }
input[type="checkbox"] { input[type="checkbox"] {
background: #dae7ee; background: #dae7ee;
padding: 0; padding: 0;
@@ -502,13 +550,15 @@ select {
margin-bottom: 5px; margin-bottom: 5px;
min-width: 100px; min-width: 100px;
} }
select.dropdown { select.dropdown {
padding: 2px 4px 2px 24px; padding: 2px 4px 2px 24px;
height: 26px; height: 26px;
border: 1px solid #d9d9d9; border: 1px solid #d9d9d9;
margin-bottom: 5px; margin-bottom: 5px;
border-radius: 3px; border-radius: 3px;
background: url(../../../../templates/Sparkle/assets/img/icons/down.png) no-repeat 9px; background: url(../../../../templates/Sparkle/assets/img/icons/down.png)
no-repeat 9px;
-webkit-appearance: none; -webkit-appearance: none;
-moz-appearance: none; -moz-appearance: none;
appearance: none; appearance: none;
@@ -541,22 +591,47 @@ select.dropdown {
margin-bottom: .5em; margin-bottom: .5em;
font-size: 120%; font-size: 120%;
} }
.installprogress { .installprogress {
width: 100%; width: 100%;
background-color: #e4e4e4; background-color: #e4e4e4;
height: 5px; height: 5px;
border-bottom: 1px solid #d1d5d8; border-bottom: 1px solid #d1d5d8;
} }
.installprogress .bar { .installprogress .bar {
background-color: #35aa47; background-color: #35aa47;
height: 5px; height: 5px;
} }
.red { color: #ff0000; } .red {
.green { color: green; } color: #ff0000;
.orange { color: orange; } }
.blue { color: blue; }
.install-block { width: 65%; } .green {
.install-step { width: 250px; } color: green;
.install-h3 { text-align: center; } }
.install-text { margin: 20px 20px 0 !important; }
.orange {
color: orange;
}
.blue {
color: blue;
}
.install-block {
width: 65%;
}
.install-step {
width: 250px;
}
.install-h3 {
text-align: center;
}
.install-text {
margin: 20px 20px 0 !important;
}

View File

@@ -3,6 +3,7 @@ namespace Froxlor\Api\Commands;
use Froxlor\Database as Database; use Froxlor\Database as Database;
use Froxlor\Settings as Settings; use Froxlor\Settings as Settings;
/** /**
* This file is part of the Froxlor project. * This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors). * Copyright (c) 2010 the Froxlor Team (see authors).

View File

@@ -3,7 +3,6 @@ namespace Froxlor\Api\Commands;
use Froxlor\Database as Database; use Froxlor\Database as Database;
/** /**
* This file is part of the Froxlor project. * This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors). * Copyright (c) 2010 the Froxlor Team (see authors).

View File

@@ -3,6 +3,7 @@ namespace Froxlor\Api\Commands;
use Froxlor\Database as Database; use Froxlor\Database as Database;
use Froxlor\Settings as Settings; use Froxlor\Settings as Settings;
/** /**
* This file is part of the Froxlor project. * This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors). * Copyright (c) 2010 the Froxlor Team (see authors).

View File

@@ -1,5 +1,4 @@
<?php <?php
namespace Froxlor\Cli; namespace Froxlor\Cli;
/** /**
@@ -16,7 +15,6 @@ namespace Froxlor\Cli;
* @package Cron * @package Cron
* *
*/ */
class ConfigServicesCmd extends CmdLineHandler class ConfigServicesCmd extends CmdLineHandler
{ {

View File

@@ -2,7 +2,7 @@
namespace Froxlor\Cron\Http; namespace Froxlor\Cron\Http;
use Froxlor\Database\Database; use Froxlor\Database\Database;
use \Froxlor\Settings; use Froxlor\Settings;
use Froxlor\Cron\Http\Php\Fpm; use Froxlor\Cron\Http\Php\Fpm;
use Froxlor\Cron\Http\Php\PhpInterface; use Froxlor\Cron\Http\Php\PhpInterface;

View File

@@ -2,7 +2,7 @@
namespace Froxlor\Cron\Http; namespace Froxlor\Cron\Http;
use Froxlor\Database\Database; use Froxlor\Database\Database;
use \Froxlor\Settings; use Froxlor\Settings;
use Froxlor\Cron\Http\Php\PhpInterface; use Froxlor\Cron\Http\Php\PhpInterface;
/** /**
@@ -21,20 +21,18 @@ use Froxlor\Cron\Http\Php\PhpInterface;
* @package Cron * @package Cron
* *
*/ */
class ApacheFcgi extends Apache class ApacheFcgi extends Apache
{ {
protected function composePhpOptions($domain, $ssl_vhost = false) protected function composePhpOptions($domain, $ssl_vhost = false)
{ {
$php_options_text = ''; $php_options_text = '';
if($domain['phpenabled_customer'] == 1 && $domain['phpenabled_vhost'] == '1') if ($domain['phpenabled_customer'] == 1 && $domain['phpenabled_vhost'] == '1') {
{
$php = new PhpInterface($domain); $php = new PhpInterface($domain);
$phpconfig = $php->getPhpConfig((int) $domain['phpsettingid']); $phpconfig = $php->getPhpConfig((int) $domain['phpsettingid']);
if((int)Settings::Get('phpfpm.enabled') == 1) if ((int) Settings::Get('phpfpm.enabled') == 1) {
{
$srvName = 'fpm.external'; $srvName = 'fpm.external';
if ($domain['ssl'] == 1 && $ssl_vhost) { if ($domain['ssl'] == 1 && $ssl_vhost) {
$srvName = 'ssl-fpm.external'; $srvName = 'ssl-fpm.external';
@@ -46,9 +44,7 @@ class ApacheFcgi extends Apache
} }
// mod_proxy stuff for apache-2.4 // mod_proxy stuff for apache-2.4
if (Settings::Get('system.apache24') == '1' if (Settings::Get('system.apache24') == '1' && Settings::Get('phpfpm.use_mod_proxy') == '1') {
&& Settings::Get('phpfpm.use_mod_proxy') == '1'
) {
$filesmatch = $phpconfig['fpm_settings']['limit_extensions']; $filesmatch = $phpconfig['fpm_settings']['limit_extensions'];
$extensions = explode(" ", $filesmatch); $extensions = explode(" ", $filesmatch);
$filesmatch = ""; $filesmatch = "";
@@ -79,7 +75,6 @@ class ApacheFcgi extends Apache
$php_options_text .= ' CGIPassAuth On' . "\n"; $php_options_text .= ' CGIPassAuth On' . "\n";
$php_options_text .= ' </Directory>' . "\n"; $php_options_text .= ' </Directory>' . "\n";
} }
} else { } else {
$addheader = ""; $addheader = "";
if ($phpconfig['pass_authorizationheader'] == '1') { if ($phpconfig['pass_authorizationheader'] == '1') {
@@ -116,24 +111,18 @@ class ApacheFcgi extends Apache
$php_options_text .= ' </Directory>' . "\n"; $php_options_text .= ' </Directory>' . "\n";
$php_options_text .= ' Alias /fastcgiphp ' . $php->getInterface()->getAliasConfigDir() . $srvName . "\n"; $php_options_text .= ' Alias /fastcgiphp ' . $php->getInterface()->getAliasConfigDir() . $srvName . "\n";
} }
} } else {
else
{
$php_options_text .= ' FcgidIdleTimeout ' . Settings::Get('system.mod_fcgid_idle_timeout') . "\n"; $php_options_text .= ' FcgidIdleTimeout ' . Settings::Get('system.mod_fcgid_idle_timeout') . "\n";
if((int)Settings::Get('system.mod_fcgid_wrapper') == 0) if ((int) Settings::Get('system.mod_fcgid_wrapper') == 0) {
{
$php_options_text .= ' SuexecUserGroup "' . $domain['loginname'] . '" "' . $domain['loginname'] . '"' . "\n"; $php_options_text .= ' SuexecUserGroup "' . $domain['loginname'] . '" "' . $domain['loginname'] . '"' . "\n";
$php_options_text .= ' ScriptAlias /php/ ' . $php->getInterface()->getConfigDir() . "\n"; $php_options_text .= ' ScriptAlias /php/ ' . $php->getInterface()->getConfigDir() . "\n";
} } else {
else
{
$php_options_text .= ' SuexecUserGroup "' . $domain['loginname'] . '" "' . $domain['loginname'] . '"' . "\n"; $php_options_text .= ' SuexecUserGroup "' . $domain['loginname'] . '" "' . $domain['loginname'] . '"' . "\n";
$php_options_text .= ' <Directory "' . \Froxlor\FileDir::makeCorrectDir($domain['documentroot']) . '">' . "\n"; $php_options_text .= ' <Directory "' . \Froxlor\FileDir::makeCorrectDir($domain['documentroot']) . '">' . "\n";
$file_extensions = explode(' ', $phpconfig['file_extensions']); $file_extensions = explode(' ', $phpconfig['file_extensions']);
$php_options_text .= ' <FilesMatch "\.(' . implode('|', $file_extensions) . ')$">' . "\n"; $php_options_text .= ' <FilesMatch "\.(' . implode('|', $file_extensions) . ')$">' . "\n";
$php_options_text .= ' SetHandler fcgid-script' . "\n"; $php_options_text .= ' SetHandler fcgid-script' . "\n";
foreach($file_extensions as $file_extension) foreach ($file_extensions as $file_extension) {
{
$php_options_text .= ' FcgidWrapper ' . $php->getInterface()->getStarterFile() . ' .' . $file_extension . "\n"; $php_options_text .= ' FcgidWrapper ' . $php->getInterface()->getStarterFile() . ' .' . $file_extension . "\n";
} }
$php_options_text .= ' Options +ExecCGI' . "\n"; $php_options_text .= ' Options +ExecCGI' . "\n";
@@ -161,9 +150,7 @@ class ApacheFcgi extends Apache
// create php.ini (fpm does nothing here, as it // create php.ini (fpm does nothing here, as it
// defines ini-settings in its pool config) // defines ini-settings in its pool config)
$php->getInterface()->createIniFile($phpconfig); $php->getInterface()->createIniFile($phpconfig);
} } else {
else
{
$php_options_text .= ' # PHP is disabled for this vHost' . "\n"; $php_options_text .= ' # PHP is disabled for this vHost' . "\n";
} }
@@ -172,20 +159,13 @@ class ApacheFcgi extends Apache
public function createOwnVhostStarter() public function createOwnVhostStarter()
{ {
if (Settings::Get('system.mod_fcgid_ownvhost') == '1' if (Settings::Get('system.mod_fcgid_ownvhost') == '1' || (Settings::Get('phpfpm.enabled') == '1' && Settings::Get('phpfpm.enabled_ownvhost') == '1')) {
|| (Settings::Get('phpfpm.enabled') == '1'
&& Settings::Get('phpfpm.enabled_ownvhost') == '1')
) {
$mypath = \Froxlor\Froxlor::getInstallDir(); $mypath = \Froxlor\Froxlor::getInstallDir();
if (Settings::Get('system.mod_fcgid_ownvhost') == '1') if (Settings::Get('system.mod_fcgid_ownvhost') == '1') {
{
$user = Settings::Get('system.mod_fcgid_httpuser'); $user = Settings::Get('system.mod_fcgid_httpuser');
$group = Settings::Get('system.mod_fcgid_httpgroup'); $group = Settings::Get('system.mod_fcgid_httpgroup');
} } elseif (Settings::Get('phpfpm.enabled') == '1' && Settings::Get('phpfpm.enabled_ownvhost') == '1') {
elseif(Settings::Get('phpfpm.enabled') == '1'
&& Settings::Get('phpfpm.enabled_ownvhost') == '1'
) {
$user = Settings::Get('phpfpm.vhost_httpuser'); $user = Settings::Get('phpfpm.vhost_httpuser');
$group = Settings::Get('phpfpm.vhost_httpgroup'); $group = Settings::Get('phpfpm.vhost_httpgroup');

View File

@@ -1,4 +1,7 @@
<?php if (!defined('MASTER_CRONJOB')) die('You cannot access this file directly!'); <?php
if (! defined('MASTER_CRONJOB'))
die('You cannot access this file directly!');
/** /**
* This file is part of the Froxlor project. * This file is part of the Froxlor project.
@@ -14,11 +17,10 @@
* @package Cron * @package Cron
* *
*/ */
use \Froxlor\Database; use Froxlor\Database;
use \Froxlor\Settings; use Froxlor\Settings;
if ((int)Settings::Get('system.report_webmax') > 0) if ((int) Settings::Get('system.report_webmax') > 0) {
{
/** /**
* report about diskusage for customers * report about diskusage for customers
*/ */
@@ -34,11 +36,7 @@ if ((int)Settings::Get('system.report_webmax') > 0)
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) { while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
if (isset($row['diskspace']) if (isset($row['diskspace']) && $row['diskspace_used'] != null && $row['diskspace_used'] > 0 && (($row['diskspace_used'] * 100) / $row['diskspace']) >= (int) Settings::Get('system.report_webmax')) {
&& $row['diskspace_used'] != null
&& $row['diskspace_used'] > 0
&& (($row['diskspace_used'] * 100) / $row['diskspace']) >= (int)Settings::Get('system.report_webmax')
) {
$rep_userinfo = array( $rep_userinfo = array(
'name' => $row['name'], 'name' => $row['name'],
@@ -58,12 +56,16 @@ if ((int)Settings::Get('system.report_webmax') > 0)
SELECT `file` FROM `" . TABLE_PANEL_LANGUAGE . "` SELECT `file` FROM `" . TABLE_PANEL_LANGUAGE . "`
WHERE `language` = :deflang WHERE `language` = :deflang
"); ");
$lngfile = Database::pexecute_first($lngfile_stmt, array('deflang' => $row['def_language'])); $lngfile = Database::pexecute_first($lngfile_stmt, array(
'deflang' => $row['def_language']
));
if ($lngfile !== null) { if ($lngfile !== null) {
$langfile = $lngfile['file']; $langfile = $lngfile['file'];
} else { } else {
$lngfile = Database::pexecute_first($lngfile_stmt, array('deflang' => Settings::Get('panel.standardlanguage'))); $lngfile = Database::pexecute_first($lngfile_stmt, array(
'deflang' => Settings::Get('panel.standardlanguage')
));
$langfile = $lngfile['file']; $langfile = $lngfile['file'];
} }
@@ -117,7 +119,9 @@ if ((int)Settings::Get('system.report_webmax') > 0)
UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `reportsent` = '2' UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `reportsent` = '2'
WHERE `customerid` = :customerid WHERE `customerid` = :customerid
"); ");
Database::pexecute($upd_stmt, array('customerid' => $row['customerid'])); Database::pexecute($upd_stmt, array(
'customerid' => $row['customerid']
));
} }
} }
@@ -130,11 +134,7 @@ if ((int)Settings::Get('system.report_webmax') > 0)
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) { while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
if (isset($row['diskspace']) if (isset($row['diskspace']) && $row['diskspace_used'] != null && $row['diskspace_used'] > 0 && (($row['diskspace_used'] * 100) / $row['diskspace']) >= (int) Settings::Get('system.report_webmax')) {
&& $row['diskspace_used'] != null
&& $row['diskspace_used'] > 0
&& (($row['diskspace_used'] * 100) / $row['diskspace']) >= (int)Settings::Get('system.report_webmax')
) {
$replace_arr = array( $replace_arr = array(
'NAME' => $row['name'], 'NAME' => $row['name'],
@@ -148,12 +148,16 @@ if ((int)Settings::Get('system.report_webmax') > 0)
SELECT `file` FROM `" . TABLE_PANEL_LANGUAGE . "` SELECT `file` FROM `" . TABLE_PANEL_LANGUAGE . "`
WHERE `language` = :deflang WHERE `language` = :deflang
"); ");
$lngfile = Database::pexecute_first($lngfile_stmt, array('deflang' => $row['def_language'])); $lngfile = Database::pexecute_first($lngfile_stmt, array(
'deflang' => $row['def_language']
));
if ($lngfile !== null) { if ($lngfile !== null) {
$langfile = $lngfile['file']; $langfile = $lngfile['file'];
} else { } else {
$lngfile = Database::pexecute_first($lngfile_stmt, array('deflang' => Settings::Get('panel.standardlanguage'))); $lngfile = Database::pexecute_first($lngfile_stmt, array(
'deflang' => Settings::Get('panel.standardlanguage')
));
$langfile = $lngfile['file']; $langfile = $lngfile['file'];
} }
@@ -207,7 +211,9 @@ if ((int)Settings::Get('system.report_webmax') > 0)
UPDATE `" . TABLE_PANEL_ADMINS . "` SET `reportsent` = '2' UPDATE `" . TABLE_PANEL_ADMINS . "` SET `reportsent` = '2'
WHERE `adminid` = :adminid WHERE `adminid` = :adminid
"); ");
Database::pexecute($upd_stmt, array('adminid' => $row['adminid'])); Database::pexecute($upd_stmt, array(
'adminid' => $row['adminid']
));
} }
} }
} // webmax > 0 } // webmax > 0

View File

@@ -70,7 +70,8 @@ class FroxlorLogger
/** /**
* return FroxlorLogger instance * return FroxlorLogger instance
* *
* @param array $userinfo unused * @param array $userinfo
* unused
* *
* @return FroxlorLogger * @return FroxlorLogger
*/ */

View File

@@ -5,16 +5,21 @@ use Froxlor\Settings;
class Statistics class Statistics
{ {
/** /**
* Create or modify the AWStats configuration file for the given domain. * Create or modify the AWStats configuration file for the given domain.
* Modified by Berend Dekens to allow custom configurations. * Modified by Berend Dekens to allow custom configurations.
* *
* @param logFile * @param
* @param siteDomain * logFile
* @param hostAliases * @param
* siteDomain
* @param
* hostAliases
* @return null * @return null
*/ */
public static function createAWStatsConf($logFile, $siteDomain, $hostAliases, $customerDocroot, $awstats_params = array()) { public static function createAWStatsConf($logFile, $siteDomain, $hostAliases, $customerDocroot, $awstats_params = array())
{
// Generation header // Generation header
$header = "## GENERATED BY FROXLOR\n"; $header = "## GENERATED BY FROXLOR\n";
@@ -76,9 +81,7 @@ class Statistics
// Write the configuration file // Write the configuration file
while (($line = fgets($awstats_model_conf, 4096)) !== false) { while (($line = fgets($awstats_model_conf, 4096)) !== false) {
if (!preg_match('/^#/', $line) if (! preg_match('/^#/', $line) && trim($line) != '') {
&& trim($line) != ''
) {
fwrite($awstats_domain_conf, preg_replace($regex, $replace, $line)); fwrite($awstats_domain_conf, preg_replace($regex, $replace, $line));
} }
} }
@@ -92,17 +95,16 @@ class Statistics
* either with webserver-user or - if fcgid * either with webserver-user or - if fcgid
* is used - the customers name, #258 * is used - the customers name, #258
* *
* @param array $row array if panel_customers * @param array $row
* array if panel_customers
* *
* @return void * @return void
*/ */
public static function makeChownWithNewStats($row) { public static function makeChownWithNewStats($row)
{
// get correct user // get correct user
if ((Settings::Get('system.mod_fcgid') == '1' || Settings::Get('phpfpm.enabled') == '1') if ((Settings::Get('system.mod_fcgid') == '1' || Settings::Get('phpfpm.enabled') == '1') && isset($row['deactivated']) && $row['deactivated'] == '0') {
&& isset($row['deactivated'])
&& $row['deactivated'] == '0'
) {
$user = $row['loginname']; $user = $row['loginname'];
$group = $row['loginname']; $group = $row['loginname'];
} else { } else {
@@ -124,5 +126,4 @@ class Statistics
\Froxlor\FileDir::safe_exec('chown -R ' . escapeshellarg($user) . ':' . escapeshellarg($group) . ' ' . escapeshellarg(\Froxlor\FileDir::makeCorrectDir($dir))); \Froxlor\FileDir::safe_exec('chown -R ' . escapeshellarg($user) . ':' . escapeshellarg($group) . ' ' . escapeshellarg(\Froxlor\FileDir::makeCorrectDir($dir)));
} }
} }
} }

View File

@@ -1,10 +1,8 @@
<?php <?php
namespace Froxlor; namespace Froxlor;
use Froxlor\Database\Database; use Froxlor\Database\Database;
/** /**
* This file is part of the Froxlor project. * This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors). * Copyright (c) 2010 the Froxlor Team (see authors).
@@ -41,7 +39,8 @@ use Froxlor\Database\Database;
* @method static boolean Flush () Store all un-saved changes to the database and re-read in all settings * @method static boolean Flush () Store all un-saved changes to the database and re-read in all settings
* @method static void Stash () forget all un-saved changes to settings * @method static void Stash () forget all un-saved changes to settings
*/ */
class Settings { class Settings
{
/** /**
* current settings object * current settings object
@@ -75,7 +74,8 @@ class Settings {
/** /**
* private constructor, reads in all settings * private constructor, reads in all settings
*/ */
private function __construct() { private function __construct()
{
$this->_readSettings(); $this->_readSettings();
self::$_updatedata = array(); self::$_updatedata = array();
// prepare statement // prepare statement
@@ -89,7 +89,8 @@ class Settings {
* Read in all settings from the database * Read in all settings from the database
* and set the internal $_data array * and set the internal $_data array
*/ */
private function _readSettings() { private function _readSettings()
{
$result_stmt = Database::query(" $result_stmt = Database::query("
SELECT `settingid`, `settinggroup`, `varname`, `value` SELECT `settingid`, `settinggroup`, `varname`, `value`
FROM `" . TABLE_PANEL_SETTINGS . "` FROM `" . TABLE_PANEL_SETTINGS . "`
@@ -108,7 +109,8 @@ class Settings {
* @param string $varname * @param string $varname
* @param string $value * @param string $value
*/ */
private function _storeSetting($group = null, $varname = null, $value = null) { private function _storeSetting($group = null, $varname = null, $value = null)
{
$upd_data = array( $upd_data = array(
'group' => $group, 'group' => $group,
'varname' => $varname, 'varname' => $varname,
@@ -120,11 +122,13 @@ class Settings {
/** /**
* return a setting-value by its group and varname * return a setting-value by its group and varname
* *
* @param string $setting a group and a varname separated by a dot (group.varname) * @param string $setting
* a group and a varname separated by a dot (group.varname)
* *
* @return mixed * @return mixed
*/ */
public function pGet($setting = null) { public function pGet($setting = null)
{
$sstr = explode(".", $setting); $sstr = explode(".", $setting);
// no separator - do'h // no separator - do'h
if (! isset($sstr[1])) { if (! isset($sstr[1])) {
@@ -140,12 +144,15 @@ class Settings {
/** /**
* tests if a setting-value that i s a comma separated list contains an entry * tests if a setting-value that i s a comma separated list contains an entry
* *
* @param string $setting a group and a varname separated by a dot (group.varname) * @param string $setting
* @param string $entry the entry that is expected to be in the list * a group and a varname separated by a dot (group.varname)
* @param string $entry
* the entry that is expected to be in the list
* *
* @return boolean true, if the list contains $entry * @return boolean true, if the list contains $entry
*/ */
public function pIsInList($setting = null, $entry = null) { public function pIsInList($setting = null, $entry = null)
{
$s = Settings::Get($setting); $s = Settings::Get($setting);
if ($s == null) { if ($s == null) {
return false; return false;
@@ -157,13 +164,15 @@ class Settings {
/** /**
* update a setting / set a new value * update a setting / set a new value
* *
* @param string $setting a group and a varname separated by a dot (group.varname) * @param string $setting
* a group and a varname separated by a dot (group.varname)
* @param string $value * @param string $value
* @param boolean $instant_save * @param boolean $instant_save
* *
* @return bool * @return bool
*/ */
public function pSet($setting = null, $value = null, $instant_save = true) { public function pSet($setting = null, $value = null, $instant_save = true)
{
// check whether the setting exists // check whether the setting exists
if (Settings::Get($setting) !== null) { if (Settings::Get($setting) !== null) {
// set new value in array // set new value in array
@@ -195,12 +204,14 @@ class Settings {
/** /**
* add a new setting to the database (mainly used in updater) * add a new setting to the database (mainly used in updater)
* *
* @param string $setting a group and a varname separated by a dot (group.varname) * @param string $setting
* a group and a varname separated by a dot (group.varname)
* @param string $value * @param string $value
* *
* @return boolean * @return boolean
*/ */
public function pAddNew($setting = null, $value = null) { public function pAddNew($setting = null, $value = null)
{
// first check if it doesn't exist // first check if it doesn't exist
if (Settings::Get($setting) === null) { if (Settings::Get($setting) === null) {
@@ -233,7 +244,8 @@ class Settings {
* Store all un-saved changes to the database and * Store all un-saved changes to the database and
* re-read in all settings * re-read in all settings
*/ */
public function pFlush() { public function pFlush()
{
if (is_array(self::$_updatedata) && count(self::$_updatedata) > 0) { if (is_array(self::$_updatedata) && count(self::$_updatedata) > 0) {
// save all un-saved changes to the settings // save all un-saved changes to the settings
foreach (self::$_updatedata as $group => $vargroup) { foreach (self::$_updatedata as $group => $vargroup) {
@@ -252,7 +264,8 @@ class Settings {
/** /**
* forget all un-saved changes to settings * forget all un-saved changes to settings
*/ */
public function pStash() { public function pStash()
{
// empty update array // empty update array
self::$_updatedata = array(); self::$_updatedata = array();
} }
@@ -262,7 +275,8 @@ class Settings {
* *
* @return object * @return object
*/ */
private static function getInstance() { private static function getInstance()
{
// do we got an object already? // do we got an object already?
if (self::$_obj == null) { if (self::$_obj == null) {
self::$_obj = new self(); self::$_obj = new self();
@@ -280,12 +294,16 @@ class Settings {
* *
* @return mixed * @return mixed
*/ */
public static function __callStatic($name, $args) { public static function __callStatic($name, $args)
{
// as our functions are not static and therefore cannot // as our functions are not static and therefore cannot
// be called statically, we prefix a 'p' to all of // be called statically, we prefix a 'p' to all of
// our public functions so we can use Settings::functionname() // our public functions so we can use Settings::functionname()
// which looks cooler and is easier to use // which looks cooler and is easier to use
$callback = array(self::getInstance(), "p".$name); $callback = array(
self::getInstance(),
"p" . $name
);
$result = call_user_func_array($callback, $args); $result = call_user_func_array($callback, $args);
return $result; return $result;
} }

View File

@@ -145,72 +145,31 @@ class Crypt
* we check against the length, if not matched * we check against the length, if not matched
* an error message will be output and 'exit' is called * an error message will be output and 'exit' is called
* *
* @param string $password the password to validate * @param string $password
* the password to validate
* *
* @return string either the password or an errormessage+exit * @return string either the password or an errormessage+exit
*/ */
public static function validatePassword($password = null, $json_response = false) { public static function validatePassword($password = null, $json_response = false)
{
if (Settings::Get('panel.password_min_length') > 0) { if (Settings::Get('panel.password_min_length') > 0) {
$password = validate( $password = validate($password, Settings::Get('panel.password_min_length'), '/^.{' . (int) Settings::Get('panel.password_min_length') . ',}$/D', 'notrequiredpasswordlength', array(), $json_response);
$password,
Settings::Get('panel.password_min_length'),
'/^.{'.(int)Settings::Get('panel.password_min_length').',}$/D',
'notrequiredpasswordlength',
array(),
$json_response
);
} }
if (Settings::Get('panel.password_regex') != '') { if (Settings::Get('panel.password_regex') != '') {
$password = validate( $password = validate($password, Settings::Get('panel.password_regex'), Settings::Get('panel.password_regex'), 'notrequiredpasswordcomplexity', array(), $json_response);
$password,
Settings::Get('panel.password_regex'),
Settings::Get('panel.password_regex'),
'notrequiredpasswordcomplexity',
array(),
$json_response
);
} else { } else {
if (Settings::Get('panel.password_alpha_lower')) { if (Settings::Get('panel.password_alpha_lower')) {
$password = validate( $password = validate($password, '/.*[a-z]+.*/', '/.*[a-z]+.*/', 'notrequiredpasswordcomplexity', array(), $json_response);
$password,
'/.*[a-z]+.*/',
'/.*[a-z]+.*/',
'notrequiredpasswordcomplexity',
array(),
$json_response
);
} }
if (Settings::Get('panel.password_alpha_upper')) { if (Settings::Get('panel.password_alpha_upper')) {
$password = validate( $password = validate($password, '/.*[A-Z]+.*/', '/.*[A-Z]+.*/', 'notrequiredpasswordcomplexity', array(), $json_response);
$password,
'/.*[A-Z]+.*/',
'/.*[A-Z]+.*/',
'notrequiredpasswordcomplexity',
array(),
$json_response
);
} }
if (Settings::Get('panel.password_numeric')) { if (Settings::Get('panel.password_numeric')) {
$password = validate( $password = validate($password, '/.*[0-9]+.*/', '/.*[0-9]+.*/', 'notrequiredpasswordcomplexity', array(), $json_response);
$password,
'/.*[0-9]+.*/',
'/.*[0-9]+.*/',
'notrequiredpasswordcomplexity',
array(),
$json_response
);
} }
if (Settings::Get('panel.password_special_char_required')) { if (Settings::Get('panel.password_special_char_required')) {
$password = validate( $password = validate($password, '/.*[' . preg_quote(Settings::Get('panel.password_special_char')) . ']+.*/', '/.*[' . preg_quote(Settings::Get('panel.password_special_char')) . ']+.*/', 'notrequiredpasswordcomplexity', array(), $json_response);
$password,
'/.*[' . preg_quote(Settings::Get('panel.password_special_char')) . ']+.*/',
'/.*[' . preg_quote(Settings::Get('panel.password_special_char')) . ']+.*/',
'notrequiredpasswordcomplexity',
array(),
$json_response
);
} }
} }
@@ -225,15 +184,19 @@ class Crypt
* additionally it updates the hash if the system settings changed * additionally it updates the hash if the system settings changed
* or if the very old md5() sum is used * or if the very old md5() sum is used
* *
* @param array $userinfo user-data from table * @param array $userinfo
* @param string $password the password to validate * user-data from table
* @param string $table either panel_customers or panel_admins * @param string $password
* @param string $uid user-id-field in $table * the password to validate
* @param string $table
* either panel_customers or panel_admins
* @param string $uid
* user-id-field in $table
* *
* @return boolean * @return boolean
*/ */
public static function validatePasswordLogin($userinfo = null, $password = null, $table = 'panel_customers', $uid = 'customerid') { public static function validatePasswordLogin($userinfo = null, $password = null, $table = 'panel_customers', $uid = 'customerid')
{
$systype = 3; // SHA256 $systype = 3; // SHA256
if (Settings::Get('system.passwordcryptfunc') !== null) { if (Settings::Get('system.passwordcryptfunc') !== null) {
$systype = (int) Settings::Get('system.passwordcryptfunc'); $systype = (int) Settings::Get('system.passwordcryptfunc');
@@ -256,8 +219,8 @@ class Crypt
if (($systype == 1 && $hash_type_chk != '$1$') || // MD5 if (($systype == 1 && $hash_type_chk != '$1$') || // MD5
($systype == 2 && $hash_type_chk != '$2$') || // BLOWFISH ($systype == 2 && $hash_type_chk != '$2$') || // BLOWFISH
($systype == 3 && $hash_type_chk != '$5$') || // SHA256 ($systype == 3 && $hash_type_chk != '$5$') || // SHA256
($systype == 4 && $hash_type_chk != '$6$') // SHA512 ($systype == 4 && $hash_type_chk != '$6$')) // SHA512
) { {
$update_hash = true; $update_hash = true;
} }
} }
@@ -280,8 +243,5 @@ class Crypt
return true; return true;
} }
return false; return false;
} }
} }

View File

@@ -15,14 +15,16 @@ namespace Froxlor\UI;
* @package Classes * @package Classes
* *
*/ */
class HtmlForm class HtmlForm
{ {
/** /**
* internal tmp-variable to store form * internal tmp-variable to store form
*
* @var string * @var string
*/ */
private static $_form = ''; private static $_form = '';
private static $_filename = ''; private static $_filename = '';
public static function genHTMLForm($data = array()) public static function genHTMLForm($data = array())
@@ -32,20 +34,17 @@ class HtmlForm
self::$_form = ''; self::$_form = '';
foreach($data as $fdata) foreach ($data as $fdata) {
{
$sections = $fdata['sections']; $sections = $fdata['sections'];
foreach($sections as $section) foreach ($sections as $section) {
{
/* /*
* here be section title & image * here be section title & image
*/ */
$title = $section['title']; $title = $section['title'];
$image = $section['image']; $image = $section['image'];
if(isset($section['visible']) && $section['visible'] === false) if (isset($section['visible']) && $section['visible'] === false) {
{
continue; continue;
} }
@@ -56,10 +55,8 @@ class HtmlForm
} }
$nexto = false; $nexto = false;
foreach($section['fields'] as $fieldname => $fielddata) foreach ($section['fields'] as $fieldname => $fielddata) {
{ if (isset($fielddata['visible']) && $fielddata['visible'] === false) {
if(isset($fielddata['visible']) && $fielddata['visible'] === false)
{
continue; continue;
} }
@@ -70,7 +67,9 @@ class HtmlForm
$mandatory = self::_getMandatoryFlag($fielddata); $mandatory = self::_getMandatoryFlag($fielddata);
$data_field = self::_parseDataField($fieldname, $fielddata); $data_field = self::_parseDataField($fieldname, $fielddata);
if (isset($fielddata['has_nextto'])) { if (isset($fielddata['has_nextto'])) {
$nexto = array('field' => $fieldname); $nexto = array(
'field' => $fieldname
);
$data_field .= '{NEXTTOFIELD_' . $fieldname . '}'; $data_field .= '{NEXTTOFIELD_' . $fieldname . '}';
} else { } else {
$nexto = false; $nexto = false;
@@ -80,11 +79,7 @@ class HtmlForm
$data_field = self::_parseDataField($fieldname, $fielddata); $data_field = self::_parseDataField($fieldname, $fielddata);
$data_field = str_replace("\t", "", $data_field); $data_field = str_replace("\t", "", $data_field);
$data_field = $fielddata['next_to_prefix'] . $data_field; $data_field = $fielddata['next_to_prefix'] . $data_field;
self::$_form = str_replace( self::$_form = str_replace('{NEXTTOFIELD_' . $fielddata['next_to'] . '}', $data_field, self::$_form);
'{NEXTTOFIELD_'.$fielddata['next_to'].'}',
$data_field,
self::$_form
);
$nexto = false; $nexto = false;
} }
} }
@@ -101,41 +96,48 @@ class HtmlForm
private static function _parseDataField($fieldname, $data = array()) private static function _parseDataField($fieldname, $data = array())
{ {
switch($data['type']) switch ($data['type']) {
{
case 'text': case 'text':
return self::_textBox($fieldname, $data); break; return self::_textBox($fieldname, $data);
break;
case 'textul': case 'textul':
return self::_textBox($fieldname, $data, 'text', true); break; return self::_textBox($fieldname, $data, 'text', true);
break;
case 'password': case 'password':
return self::_textBox($fieldname, $data, 'password'); break; return self::_textBox($fieldname, $data, 'password');
break;
case 'hidden': case 'hidden':
return self::_textBox($fieldname, $data, 'hidden'); break; return self::_textBox($fieldname, $data, 'hidden');
break;
case 'yesno': case 'yesno':
return self::_yesnoBox($data); break; return self::_yesnoBox($data);
break;
case 'select': case 'select':
return self::_selectBox($fieldname, $data); break; return self::_selectBox($fieldname, $data);
break;
case 'label': case 'label':
return self::_labelField($data); break; return self::_labelField($data);
break;
case 'textarea': case 'textarea':
return self::_textArea($fieldname, $data); break; return self::_textArea($fieldname, $data);
break;
case 'checkbox': case 'checkbox':
return self::_checkbox($fieldname, $data); break; return self::_checkbox($fieldname, $data);
break;
case 'file': case 'file':
return self::_file($fieldname, $data); break; return self::_file($fieldname, $data);
break;
case 'int': case 'int':
return self::_int($fieldname, $data); break; return self::_int($fieldname, $data);
break;
} }
} }
private static function _getMandatoryFlag($data = array()) private static function _getMandatoryFlag($data = array())
{ {
if(isset($data['mandatory'])) if (isset($data['mandatory'])) {
{
return '&nbsp;<span class="red">*</span>'; return '&nbsp;<span class="red">*</span>';
} } elseif (isset($data['mandatory_ex'])) {
elseif(isset($data['mandatory_ex']))
{
return '&nbsp;<span class="red">**</span>'; return '&nbsp;<span class="red">**</span>';
} }
return ''; return '';
@@ -165,8 +167,7 @@ class HtmlForm
} }
$ulfield = ($unlimited == true ? '&nbsp;' . $data['ul_field'] : ''); $ulfield = ($unlimited == true ? '&nbsp;' . $data['ul_field'] : '');
if(isset($data['display']) && $data['display'] != '') if (isset($data['display']) && $data['display'] != '') {
{
$ulfield = '<strong>' . $data['display'] . '</strong>'; $ulfield = '<strong>' . $data['display'] . '</strong>';
} }
@@ -224,9 +225,7 @@ class HtmlForm
id="' . $fieldname . '" id="' . $fieldname . '"
name="' . $fieldname . '" name="' . $fieldname . '"
' . (isset($data['class']) ? ' class="' . $data['class'] . '" ' : '') . ' ' . (isset($data['class']) ? ' class="' . $data['class'] . '" ' : '') . '
>' >' . $select_var . '</select>';
.$select_var.
'</select>';
} }
/** /**
@@ -246,12 +245,14 @@ class HtmlForm
* ) * )
* </code> * </code>
* *
* @param string $fieldname contains the fieldname * @param string $fieldname
* @param array $data contains the data array * contains the fieldname
* @param array $data
* contains the data array
*/ */
public static function _checkbox($fieldname = '', $data = array()) { public static function _checkbox($fieldname = '', $data = array())
{
// $data['value'] contains checked items // $data['value'] contains checked items
$checked = array(); $checked = array();
if (isset($data['value'])) { if (isset($data['value'])) {
$checked = $data['value']; $checked = $data['value'];
@@ -259,7 +260,9 @@ class HtmlForm
if (isset($_SESSION['requestData'])) { if (isset($_SESSION['requestData'])) {
if (isset($_SESSION['requestData'][$fieldname])) { if (isset($_SESSION['requestData'][$fieldname])) {
$checked = array($_SESSION['requestData'][$fieldname]); $checked = array(
$_SESSION['requestData'][$fieldname]
);
} }
} }
@@ -312,8 +315,7 @@ class HtmlForm
$value = ''; $value = '';
} }
if(isset($data['display']) && $data['display'] != '') if (isset($data['display']) && $data['display'] != '') {
{
$ulfield = '<strong>' . $data['display'] . '</strong>'; $ulfield = '<strong>' . $data['display'] . '</strong>';
} }

View File

@@ -1,7 +1,7 @@
<?php <?php
namespace Froxlor\Validate\Form; namespace Froxlor\Validate\Form;
class String class Strings
{ {
public static function validateFormFieldString($fieldname, $fielddata, $newfieldvalue) public static function validateFormFieldString($fieldname, $fielddata, $newfieldvalue)

View File

@@ -15,7 +15,6 @@
* @package AJAX * @package AJAX
* *
*/ */
require __DIR__ . '/vendor/autoload.php'; require __DIR__ . '/vendor/autoload.php';
// Load the user settings // Load the user settings

View File

@@ -14,14 +14,16 @@
* @package Classes * @package Classes
* *
*/ */
class htmlform class htmlform
{ {
/** /**
* internal tmp-variable to store form * internal tmp-variable to store form
*
* @var string * @var string
*/ */
private static $_form = ''; private static $_form = '';
private static $_filename = ''; private static $_filename = '';
public static function genHTMLForm($data = array()) public static function genHTMLForm($data = array())
@@ -31,20 +33,17 @@ class htmlform
self::$_form = ''; self::$_form = '';
foreach($data as $fdata) foreach ($data as $fdata) {
{
$sections = $fdata['sections']; $sections = $fdata['sections'];
foreach($sections as $section) foreach ($sections as $section) {
{
/* /*
* here be section title & image * here be section title & image
*/ */
$title = $section['title']; $title = $section['title'];
$image = $section['image']; $image = $section['image'];
if(isset($section['visible']) && $section['visible'] === false) if (isset($section['visible']) && $section['visible'] === false) {
{
continue; continue;
} }
@@ -55,10 +54,8 @@ class htmlform
} }
$nexto = false; $nexto = false;
foreach($section['fields'] as $fieldname => $fielddata) foreach ($section['fields'] as $fieldname => $fielddata) {
{ if (isset($fielddata['visible']) && $fielddata['visible'] === false) {
if(isset($fielddata['visible']) && $fielddata['visible'] === false)
{
continue; continue;
} }
@@ -69,7 +66,9 @@ class htmlform
$mandatory = self::_getMandatoryFlag($fielddata); $mandatory = self::_getMandatoryFlag($fielddata);
$data_field = self::_parseDataField($fieldname, $fielddata); $data_field = self::_parseDataField($fieldname, $fielddata);
if (isset($fielddata['has_nextto'])) { if (isset($fielddata['has_nextto'])) {
$nexto = array('field' => $fieldname); $nexto = array(
'field' => $fieldname
);
$data_field .= '{NEXTTOFIELD_' . $fieldname . '}'; $data_field .= '{NEXTTOFIELD_' . $fieldname . '}';
} else { } else {
$nexto = false; $nexto = false;
@@ -79,11 +78,7 @@ class htmlform
$data_field = self::_parseDataField($fieldname, $fielddata); $data_field = self::_parseDataField($fieldname, $fielddata);
$data_field = str_replace("\t", "", $data_field); $data_field = str_replace("\t", "", $data_field);
$data_field = $fielddata['next_to_prefix'] . $data_field; $data_field = $fielddata['next_to_prefix'] . $data_field;
self::$_form = str_replace( self::$_form = str_replace('{NEXTTOFIELD_' . $fielddata['next_to'] . '}', $data_field, self::$_form);
'{NEXTTOFIELD_'.$fielddata['next_to'].'}',
$data_field,
self::$_form
);
$nexto = false; $nexto = false;
} }
} }
@@ -100,41 +95,48 @@ class htmlform
private static function _parseDataField($fieldname, $data = array()) private static function _parseDataField($fieldname, $data = array())
{ {
switch($data['type']) switch ($data['type']) {
{
case 'text': case 'text':
return self::_textBox($fieldname, $data); break; return self::_textBox($fieldname, $data);
break;
case 'textul': case 'textul':
return self::_textBox($fieldname, $data, 'text', true); break; return self::_textBox($fieldname, $data, 'text', true);
break;
case 'password': case 'password':
return self::_textBox($fieldname, $data, 'password'); break; return self::_textBox($fieldname, $data, 'password');
break;
case 'hidden': case 'hidden':
return self::_textBox($fieldname, $data, 'hidden'); break; return self::_textBox($fieldname, $data, 'hidden');
break;
case 'yesno': case 'yesno':
return self::_yesnoBox($data); break; return self::_yesnoBox($data);
break;
case 'select': case 'select':
return self::_selectBox($fieldname, $data); break; return self::_selectBox($fieldname, $data);
break;
case 'label': case 'label':
return self::_labelField($data); break; return self::_labelField($data);
break;
case 'textarea': case 'textarea':
return self::_textArea($fieldname, $data); break; return self::_textArea($fieldname, $data);
break;
case 'checkbox': case 'checkbox':
return self::_checkbox($fieldname, $data); break; return self::_checkbox($fieldname, $data);
break;
case 'file': case 'file':
return self::_file($fieldname, $data); break; return self::_file($fieldname, $data);
break;
case 'int': case 'int':
return self::_int($fieldname, $data); break; return self::_int($fieldname, $data);
break;
} }
} }
private static function _getMandatoryFlag($data = array()) private static function _getMandatoryFlag($data = array())
{ {
if(isset($data['mandatory'])) if (isset($data['mandatory'])) {
{
return '&nbsp;<span class="red">*</span>'; return '&nbsp;<span class="red">*</span>';
} } elseif (isset($data['mandatory_ex'])) {
elseif(isset($data['mandatory_ex']))
{
return '&nbsp;<span class="red">**</span>'; return '&nbsp;<span class="red">**</span>';
} }
return ''; return '';
@@ -164,8 +166,7 @@ class htmlform
} }
$ulfield = ($unlimited == true ? '&nbsp;' . $data['ul_field'] : ''); $ulfield = ($unlimited == true ? '&nbsp;' . $data['ul_field'] : '');
if(isset($data['display']) && $data['display'] != '') if (isset($data['display']) && $data['display'] != '') {
{
$ulfield = '<strong>' . $data['display'] . '</strong>'; $ulfield = '<strong>' . $data['display'] . '</strong>';
} }
@@ -223,9 +224,7 @@ class htmlform
id="' . $fieldname . '" id="' . $fieldname . '"
name="' . $fieldname . '" name="' . $fieldname . '"
' . (isset($data['class']) ? ' class="' . $data['class'] . '" ' : '') . ' ' . (isset($data['class']) ? ' class="' . $data['class'] . '" ' : '') . '
>' >' . $select_var . '</select>';
.$select_var.
'</select>';
} }
/** /**
@@ -245,12 +244,14 @@ class htmlform
* ) * )
* </code> * </code>
* *
* @param string $fieldname contains the fieldname * @param string $fieldname
* @param array $data contains the data array * contains the fieldname
* @param array $data
* contains the data array
*/ */
public static function _checkbox($fieldname = '', $data = array()) { public static function _checkbox($fieldname = '', $data = array())
{
// $data['value'] contains checked items // $data['value'] contains checked items
$checked = array(); $checked = array();
if (isset($data['value'])) { if (isset($data['value'])) {
$checked = $data['value']; $checked = $data['value'];
@@ -258,7 +259,9 @@ class htmlform
if (isset($_SESSION['requestData'])) { if (isset($_SESSION['requestData'])) {
if (isset($_SESSION['requestData'][$fieldname])) { if (isset($_SESSION['requestData'][$fieldname])) {
$checked = array($_SESSION['requestData'][$fieldname]); $checked = array(
$_SESSION['requestData'][$fieldname]
);
} }
} }
@@ -311,8 +314,7 @@ class htmlform
$value = ''; $value = '';
} }
if(isset($data['display']) && $data['display'] != '') if (isset($data['display']) && $data['display'] != '') {
{
$ulfield = '<strong>' . $data['display'] . '</strong>'; $ulfield = '<strong>' . $data['display'] . '</strong>';
} }

View File

@@ -15,19 +15,25 @@
* @package Panel * @package Panel
* *
*/ */
class linker
class linker { {
private $protocol = ''; private $protocol = '';
private $username = ''; private $username = '';
private $password = ''; private $password = '';
private $hostname = ''; private $hostname = '';
private $port = 80; private $port = 80;
private $filename = 'index.php'; private $filename = 'index.php';
private $args = array(); private $args = array();
public function __construct($file = 'index.php', $sessionid = '', $hostname = '', $protocol = '', $port = '', $username = '', $password = '') { public function __construct($file = 'index.php', $sessionid = '', $hostname = '', $protocol = '', $port = '', $username = '', $password = '')
{
// Set the basic parts of our URL // Set the basic parts of our URL
$this->protocol = $protocol; $this->protocol = $protocol;
$this->username = $username; $this->username = $username;
@@ -39,40 +45,59 @@ class linker {
$this->args['s'] = $sessionid; $this->args['s'] = $sessionid;
} }
public function __set($key, $value) { public function __set($key, $value)
{
switch (strtolower($key)) { switch (strtolower($key)) {
case 'protocol': $this->protocol = $value; break; case 'protocol':
case 'username': $this->username = $value; break; $this->protocol = $value;
case 'password': $this->password = $value; break; break;
case 'hostname': $this->hostname = $value; break; case 'username':
case 'port': $this->port = $value; break; $this->username = $value;
case 'filename': $this->filename = $value; break; break;
default: return false; case 'password':
$this->password = $value;
break;
case 'hostname':
$this->hostname = $value;
break;
case 'port':
$this->port = $value;
break;
case 'filename':
$this->filename = $value;
break;
default:
return false;
} }
return true; return true;
} }
public function add($key, $value) { public function add($key, $value)
{
// Add a new value to our parameters (overwrite = enabled) // Add a new value to our parameters (overwrite = enabled)
$this->args[$key] = $value; $this->args[$key] = $value;
} }
public function del($key) { public function del($key)
{
// If the key exists in our array -> delete it // If the key exists in our array -> delete it
if (isset($this->args[$key])) { if (isset($this->args[$key])) {
unset($this->args[$key]); unset($this->args[$key]);
} }
} }
public function delAll() { public function delAll()
{
// Just resetting the array // Just resetting the array
// Until the sessionid can be removed: save it // Until the sessionid can be removed: save it
// @TODO: Remove this // @TODO: Remove this
$this->args = array('s' => $this->args['s']); $this->args = array(
's' => $this->args['s']
);
} }
public function getLink() { public function getLink()
{
$link = ''; $link = '';
// Build the basic URL // Build the basic URL

View File

@@ -19,72 +19,85 @@
/** /**
* Class to manage paging system * Class to manage paging system
*
* @package Functions * @package Functions
*/ */
class paging { class paging
{
/** /**
* Userinfo * Userinfo
*
* @var array * @var array
*/ */
private $userinfo = array(); private $userinfo = array();
/** /**
* MySQL-Table * MySQL-Table
*
* @var string * @var string
*/ */
private $table = ''; private $table = '';
/** /**
* Fields with description which should be selectable * Fields with description which should be selectable
*
* @var array * @var array
*/ */
private $fields = array(); private $fields = array();
/** /**
* Entries per page * Entries per page
*
* @var int * @var int
*/ */
private $entriesperpage = 0; private $entriesperpage = 0;
/** /**
* Number of entries of table * Number of entries of table
*
* @var int * @var int
*/ */
private $entries = 0; private $entries = 0;
/** /**
* Sortorder, asc or desc * Sortorder, asc or desc
*
* @var string * @var string
*/ */
public $sortorder = 'asc'; public $sortorder = 'asc';
/** /**
* Sortfield * Sortfield
*
* @var string * @var string
*/ */
public $sortfield = ''; public $sortfield = '';
/** /**
* Searchfield * Searchfield
*
* @var string * @var string
*/ */
private $searchfield = ''; private $searchfield = '';
/** /**
* Searchtext * Searchtext
*
* @var string * @var string
*/ */
private $searchtext = ''; private $searchtext = '';
/** /**
* Pagenumber * Pagenumber
*
* @var int * @var int
*/ */
private $pageno = 0; private $pageno = 0;
/** /**
* Switch natsorting on/off * Switch natsorting on/off
*
* @var bool * @var bool
*/ */
private $natSorting = false; private $natSorting = false;
@@ -92,18 +105,27 @@ class paging {
private $_limit = 0; private $_limit = 0;
/** /**
* Class constructor. Loads settings from request or from userdata and saves them to session. * Class constructor.
* Loads settings from request or from userdata and saves them to session.
* *
* @param array userinfo * @param
* @param string Name of Table * array userinfo
* @param array Fields, in format array( 'fieldname_in_mysql' => 'field_caption' ) * @param
* @param int *deprecated* entries per page * string Name of Table
* @param bool *deprecated* Switch natsorting on/off (global, affects all calls of sort) * @param
* @param int $default_field default sorting-field-index * array Fields, in format array( 'fieldname_in_mysql' => 'field_caption' )
* @param string $default_order default sorting order 'asc' or 'desc' * @param
* int *deprecated* entries per page
* @param
* bool *deprecated* Switch natsorting on/off (global, affects all calls of sort)
* @param int $default_field
* default sorting-field-index
* @param string $default_order
* default sorting order 'asc' or 'desc'
* *
*/ */
public function __construct($userinfo, $table, $fields, $entriesperpage = 0, $natSorting = false, $default_field = 0, $default_order = 'asc', $limit = 0) { public function __construct($userinfo, $table, $fields, $entriesperpage = 0, $natSorting = false, $default_field = 0, $default_order = 'asc', $limit = 0)
{
// entries per page and natsorting-flag are not // entries per page and natsorting-flag are not
// passed as parameter anymore, because these are // passed as parameter anymore, because these are
@@ -124,21 +146,12 @@ class paging {
$checklastpaging = (isset($this->userinfo['lastpaging']['table']) && $this->userinfo['lastpaging']['table'] == $this->table); $checklastpaging = (isset($this->userinfo['lastpaging']['table']) && $this->userinfo['lastpaging']['table'] == $this->table);
$this->userinfo['lastpaging']['table'] = $this->table; $this->userinfo['lastpaging']['table'] = $this->table;
if (isset($_REQUEST['sortorder']) if (isset($_REQUEST['sortorder']) && (strtolower($_REQUEST['sortorder']) == 'desc' || strtolower($_REQUEST['sortorder']) == 'asc')) {
&& (strtolower($_REQUEST['sortorder']) == 'desc'
|| strtolower($_REQUEST['sortorder']) == 'asc')
) {
$this->sortorder = strtolower($_REQUEST['sortorder']); $this->sortorder = strtolower($_REQUEST['sortorder']);
} else { } else {
if ($checklastpaging if ($checklastpaging && isset($this->userinfo['lastpaging']['sortorder']) && (strtolower($this->userinfo['lastpaging']['sortorder']) == 'desc' || strtolower($this->userinfo['lastpaging']['sortorder']) == 'asc')) {
&& isset($this->userinfo['lastpaging']['sortorder'])
&& (strtolower($this->userinfo['lastpaging']['sortorder']) == 'desc'
|| strtolower($this->userinfo['lastpaging']['sortorder']) == 'asc')
) {
$this->sortorder = strtolower($this->userinfo['lastpaging']['sortorder']); $this->sortorder = strtolower($this->userinfo['lastpaging']['sortorder']);
} else { } else {
$this->sortorder = $default_order; $this->sortorder = $default_order;
} }
@@ -146,15 +159,10 @@ class paging {
$this->userinfo['lastpaging']['sortorder'] = $this->sortorder; $this->userinfo['lastpaging']['sortorder'] = $this->sortorder;
if (isset($_REQUEST['sortfield']) if (isset($_REQUEST['sortfield']) && isset($fields[$_REQUEST['sortfield']])) {
&& isset($fields[$_REQUEST['sortfield']])
) {
$this->sortfield = $_REQUEST['sortfield']; $this->sortfield = $_REQUEST['sortfield'];
} else { } else {
if ($checklastpaging if ($checklastpaging && isset($this->userinfo['lastpaging']['sortfield']) && isset($fields[$this->userinfo['lastpaging']['sortfield']])) {
&& isset($this->userinfo['lastpaging']['sortfield'])
&& isset($fields[$this->userinfo['lastpaging']['sortfield']])
) {
$this->sortfield = $this->userinfo['lastpaging']['sortfield']; $this->sortfield = $this->userinfo['lastpaging']['sortfield'];
} else { } else {
$fieldnames = array_keys($fields); $fieldnames = array_keys($fields);
@@ -164,15 +172,10 @@ class paging {
$this->userinfo['lastpaging']['sortfield'] = $this->sortfield; $this->userinfo['lastpaging']['sortfield'] = $this->sortfield;
if (isset($_REQUEST['searchfield']) if (isset($_REQUEST['searchfield']) && isset($fields[$_REQUEST['searchfield']])) {
&& isset($fields[$_REQUEST['searchfield']])
) {
$this->searchfield = $_REQUEST['searchfield']; $this->searchfield = $_REQUEST['searchfield'];
} else { } else {
if ($checklastpaging if ($checklastpaging && isset($this->userinfo['lastpaging']['searchfield']) && isset($fields[$this->userinfo['lastpaging']['searchfield']])) {
&& isset($this->userinfo['lastpaging']['searchfield'])
&& isset($fields[$this->userinfo['lastpaging']['searchfield']])
) {
$this->searchfield = $this->userinfo['lastpaging']['searchfield']; $this->searchfield = $this->userinfo['lastpaging']['searchfield'];
} else { } else {
$fieldnames = array_keys($fields); $fieldnames = array_keys($fields);
@@ -182,16 +185,10 @@ class paging {
$this->userinfo['lastpaging']['searchfield'] = $this->searchfield; $this->userinfo['lastpaging']['searchfield'] = $this->searchfield;
if (isset($_REQUEST['searchtext']) if (isset($_REQUEST['searchtext']) && (preg_match('/[-_@\p{L}\p{N}*.]+$/u', $_REQUEST['searchtext']) || $_REQUEST['searchtext'] === '')) {
&& (preg_match('/[-_@\p{L}\p{N}*.]+$/u', $_REQUEST['searchtext'])
|| $_REQUEST['searchtext'] === '')
) {
$this->searchtext = trim($_REQUEST['searchtext']); $this->searchtext = trim($_REQUEST['searchtext']);
} else { } else {
if ($checklastpaging if ($checklastpaging && isset($this->userinfo['lastpaging']['searchtext']) && preg_match('/[-_@\p{L}\p{N}*.]+$/u', $this->userinfo['lastpaging']['searchtext'])) {
&& isset($this->userinfo['lastpaging']['searchtext'])
&& preg_match('/[-_@\p{L}\p{N}*.]+$/u', $this->userinfo['lastpaging']['searchtext'])
) {
$this->searchtext = $this->userinfo['lastpaging']['searchtext']; $this->searchtext = $this->userinfo['lastpaging']['searchtext'];
} else { } else {
$this->searchtext = ''; $this->searchtext = '';
@@ -200,15 +197,10 @@ class paging {
$this->userinfo['lastpaging']['searchtext'] = $this->searchtext; $this->userinfo['lastpaging']['searchtext'] = $this->searchtext;
if (isset($_REQUEST['pageno']) if (isset($_REQUEST['pageno']) && intval($_REQUEST['pageno']) != 0) {
&& intval($_REQUEST['pageno']) != 0
) {
$this->pageno = intval($_REQUEST['pageno']); $this->pageno = intval($_REQUEST['pageno']);
} else { } else {
if ($checklastpaging if ($checklastpaging && isset($this->userinfo['lastpaging']['pageno']) && intval($this->userinfo['lastpaging']['pageno']) != 0) {
&& isset($this->userinfo['lastpaging']['pageno'])
&& intval($this->userinfo['lastpaging']['pageno']) != 0
) {
$this->pageno = intval($this->userinfo['lastpaging']['pageno']); $this->pageno = intval($this->userinfo['lastpaging']['pageno']);
} else { } else {
$this->pageno = 1; $this->pageno = 1;
@@ -239,10 +231,11 @@ class paging {
/** /**
* Sets number of entries and adjusts pageno if the number of entries doesn't correspond to the pageno. * Sets number of entries and adjusts pageno if the number of entries doesn't correspond to the pageno.
* *
* @param int entries * @param
* int entries
*/ */
public function setEntries($entries) { public function setEntries($entries)
{
$this->entries = $entries; $this->entries = $entries;
if (($this->pageno - 1) * $this->entriesperpage > $this->entries) { if (($this->pageno - 1) * $this->entriesperpage > $this->entries) {
@@ -255,10 +248,12 @@ class paging {
/** /**
* Checks if a row should be displayed or not, used in loops * Checks if a row should be displayed or not, used in loops
* *
* @param int number of row * @param
* int number of row
* @return bool to display or not to display, that's the question * @return bool to display or not to display, that's the question
*/ */
public function checkDisplay($count) { public function checkDisplay($count)
{
$begin = (intval($this->pageno) - 1) * intval($this->entriesperpage); $begin = (intval($this->pageno) - 1) * intval($this->entriesperpage);
$end = (intval($this->pageno) * intval($this->entriesperpage)); $end = (intval($this->pageno) * intval($this->entriesperpage));
return (($count >= $begin && $count < $end) || $this->entriesperpage == 0); return (($count >= $begin && $count < $end) || $this->entriesperpage == 0);
@@ -267,10 +262,12 @@ class paging {
/** /**
* Returns condition code for sql query * Returns condition code for sql query
* *
* @param bool should returned condition code start with WHERE (false) or AND (true)? * @param
* bool should returned condition code start with WHERE (false) or AND (true)?
* @return string the condition code * @return string the condition code
*/ */
public function getSqlWhere($append = false) { public function getSqlWhere($append = false)
{
if ($this->searchtext != '') { if ($this->searchtext != '') {
if ($append == true) { if ($append == true) {
$condition = ' AND '; $condition = ' AND ';
@@ -293,7 +290,11 @@ class paging {
$searchfield = implode('.', $searchfield); $searchfield = implode('.', $searchfield);
$ops = array('<', '>', '='); $ops = array(
'<',
'>',
'='
);
// check if we use an operator or not // check if we use an operator or not
$useOper = 0; $useOper = 0;
@@ -324,10 +325,10 @@ class paging {
} else { } else {
$searchtext = str_replace('*', '%', $this->searchtext); $searchtext = str_replace('*', '%', $this->searchtext);
// append wildcards if user did not enter any // append wildcards if user did not enter any
if (strpos($searchtext,'%') === false) $searchtext='%'.$searchtext.'%'; if (strpos($searchtext, '%') === false)
$searchtext = '%' . $searchtext . '%';
$condition .= $searchfield . " LIKE " . \Froxlor\Database\Database::quote($searchtext); $condition .= $searchfield . " LIKE " . \Froxlor\Database\Database::quote($searchtext);
} }
} else { } else {
$condition = ''; $condition = '';
} }
@@ -338,11 +339,12 @@ class paging {
/** /**
* Returns "order by"-code for sql query * Returns "order by"-code for sql query
* *
* @param bool Switch natsorting on/off (local, affects just this call) * @param
* bool Switch natsorting on/off (local, affects just this call)
* @return string the "order by"-code * @return string the "order by"-code
*/ */
public function getSqlOrderBy($natSorting = null) { public function getSqlOrderBy($natSorting = null)
{
$sortfield = explode('.', $this->sortfield); $sortfield = explode('.', $this->sortfield);
foreach ($sortfield as $id => $field) { foreach ($sortfield as $id => $field) {
if (substr($field, - 1, 1) != '`') { if (substr($field, - 1, 1) != '`') {
@@ -359,9 +361,7 @@ class paging {
$sortfield = implode('.', $sortfield); $sortfield = implode('.', $sortfield);
$sortorder = strtoupper($this->sortorder); $sortorder = strtoupper($this->sortorder);
if ($natSorting == true if ($natSorting == true || ($natSorting === null && $this->natSorting == true)) {
|| ($natSorting === null && $this->natSorting == true)
) {
// Acts similar to php's natsort(), found in one comment at http://my.opera.com/cpr/blog/show.dml/160556 // Acts similar to php's natsort(), found in one comment at http://my.opera.com/cpr/blog/show.dml/160556
$sortcode = "ORDER BY CONCAT( IF( ASCII( LEFT( " . $sortfield . ", 5 ) ) > 57, $sortcode = "ORDER BY CONCAT( IF( ASCII( LEFT( " . $sortfield . ", 5 ) ) > 57,
LEFT( " . $sortfield . ", 1 ), 0 ), LEFT( " . $sortfield . ", 1 ), 0 ),
@@ -381,8 +381,8 @@ class paging {
* *
* @return string always empty * @return string always empty
*/ */
public function getSqlLimit() { public function getSqlLimit()
{
if ($this->_limit > 0) { if ($this->_limit > 0) {
$_offset = ($this->pageno - 1) * $this->_limit; $_offset = ($this->pageno - 1) * $this->_limit;
return ' LIMIT ' . $_offset . ',' . $this->_limit; return ' LIMIT ' . $_offset . ',' . $this->_limit;
@@ -396,11 +396,12 @@ class paging {
/** /**
* Returns html code for sorting field * Returns html code for sorting field
* *
* @param array Language array * @param
* array Language array
* @return string the html sortcode * @return string the html sortcode
*/ */
public function getHtmlSortCode($lng, $break = false) { public function getHtmlSortCode($lng, $break = false)
{
$sortcode = ''; $sortcode = '';
$fieldoptions = ''; $fieldoptions = '';
$orderoptions = ''; $orderoptions = '';
@@ -410,7 +411,10 @@ class paging {
} }
$breakorws = ($break ? '<br />' : '&nbsp;'); $breakorws = ($break ? '<br />' : '&nbsp;');
foreach (array('asc' => $lng['panel']['ascending'], 'desc' => $lng['panel']['descending']) as $sortordertype => $sortorderdescription) { foreach (array(
'asc' => $lng['panel']['ascending'],
'desc' => $lng['panel']['descending']
) as $sortordertype => $sortorderdescription) {
$orderoptions .= makeoption($sortorderdescription, $sortordertype, $this->sortorder, true, true); $orderoptions .= makeoption($sortorderdescription, $sortordertype, $this->sortorder, true, true);
} }
@@ -421,17 +425,17 @@ class paging {
/** /**
* Returns html code for sorting arrows * Returns html code for sorting arrows
* *
* @param string URL to use as base for links * @param
* @param string If set, only this field will be returned * string URL to use as base for links
* @param
* string If set, only this field will be returned
* @return mixed An array or a string (if field is set) of html code of arrows * @return mixed An array or a string (if field is set) of html code of arrows
*/ */
public function getHtmlArrowCode($baseurl, $field = '') { public function getHtmlArrowCode($baseurl, $field = '')
{
global $theme; global $theme;
if ($field != '' if ($field != '' && isset($this->fields[$field])) {
&& isset($this->fields[$field])
) {
$baseurl = htmlspecialchars($baseurl); $baseurl = htmlspecialchars($baseurl);
$fieldname = htmlspecialchars($field); $fieldname = htmlspecialchars($field);
eval("\$arrowcode =\"" . getTemplate("misc/htmlarrowcode", '1') . "\";"); eval("\$arrowcode =\"" . getTemplate("misc/htmlarrowcode", '1') . "\";");
@@ -450,11 +454,12 @@ class paging {
/** /**
* Returns html code for searching field * Returns html code for searching field
* *
* @param array Language array * @param
* array Language array
* @return string the html searchcode * @return string the html searchcode
*/ */
public function getHtmlSearchCode($lng) { public function getHtmlSearchCode($lng)
{
$searchcode = ''; $searchcode = '';
$fieldoptions = ''; $fieldoptions = '';
$searchtext = htmlspecialchars($this->searchtext); $searchtext = htmlspecialchars($this->searchtext);
@@ -468,10 +473,12 @@ class paging {
/** /**
* Returns html code for paging * Returns html code for paging
* *
* @param string URL to use as base for links * @param
* string URL to use as base for links
* @return string the html pagingcode * @return string the html pagingcode
*/ */
public function getHtmlPagingCode($baseurl) { public function getHtmlPagingCode($baseurl)
{
if ($this->entriesperpage == 0) { if ($this->entriesperpage == 0) {
return ''; return '';
} else { } else {

View File

@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<froxlor> <froxlor>
<distribution name="Gentoo" version="2.2" defaulteditor="/usr/bin/nano"> <distribution name="Gentoo" version="2.2"
defaulteditor="/usr/bin/nano">
<services> <services>
<!-- HTTP --> <!-- HTTP -->
<service type="http" title="{{lng.admin.configfiles.http}}"> <service type="http" title="{{lng.admin.configfiles.http}}">
@@ -915,8 +916,8 @@ include-dir=/etc/powerdns/froxlor/
</content> </content>
</file> </file>
<command><![CDATA[mkdir -p /etc/powerdns/froxlor/]]></command> <command><![CDATA[mkdir -p /etc/powerdns/froxlor/]]></command>
<file name="/etc/powerdns/froxlor/pdns_froxlor.conf" chown="root:root" <file name="/etc/powerdns/froxlor/pdns_froxlor.conf"
chmod="600"> chown="root:root" chmod="600">
<content><![CDATA[ <content><![CDATA[
# mysql-settings / you need to create the power-dns database for yourself! # mysql-settings / you need to create the power-dns database for yourself!
launch=gmysql launch=gmysql
@@ -931,7 +932,8 @@ gmysql-password=
</file> </file>
<command><![CDATA[/etc/init.d/pdns restart]]></command> <command><![CDATA[/etc/init.d/pdns restart]]></command>
</daemon> </daemon>
<daemon name="powerdns_bind" title="PowerDNS via bind-backend"> <daemon name="powerdns_bind"
title="PowerDNS via bind-backend">
<install><![CDATA[emerge net-dns/pdns]]></install> <install><![CDATA[emerge net-dns/pdns]]></install>
<file name="/etc/powerdns/pdns.conf" backup="true" chmod="600"> <file name="/etc/powerdns/pdns.conf" backup="true" chmod="600">
<content><![CDATA[ <content><![CDATA[
@@ -1458,8 +1460,8 @@ include-dir=/etc/powerdns/froxlor/
</content> </content>
</file> </file>
<command><![CDATA[mkdir -p /etc/powerdns/froxlor/]]></command> <command><![CDATA[mkdir -p /etc/powerdns/froxlor/]]></command>
<file name="/etc/powerdns/froxlor/pdns_froxlor.conf" chown="root:root" <file name="/etc/powerdns/froxlor/pdns_froxlor.conf"
chmod="600"> chown="root:root" chmod="600">
<content><![CDATA[ <content><![CDATA[
#local-ipv6=YOUR_IPv6_(if_any) #local-ipv6=YOUR_IPv6_(if_any)
bind-config=<BIND_CONFIG_PATH>named.conf bind-config=<BIND_CONFIG_PATH>named.conf
@@ -1495,8 +1497,8 @@ bind-check-interval=180
<command><![CDATA[chmod 0750 {{settings.system.vmail_homedir}}]]></command> <command><![CDATA[chmod 0750 {{settings.system.vmail_homedir}}]]></command>
</commands> </commands>
<files index="0"> <files index="0">
<file name="/etc/postfix/mysql-virtual_alias_maps.cf" chown="root:postfix" <file name="/etc/postfix/mysql-virtual_alias_maps.cf"
chmod="0640"> chown="root:postfix" chmod="0640">
<content><![CDATA[ <content><![CDATA[
user = <SQL_UNPRIVILEGED_USER> user = <SQL_UNPRIVILEGED_USER>
password = <SQL_UNPRIVILEGED_PASSWORD> password = <SQL_UNPRIVILEGED_PASSWORD>
@@ -1540,8 +1542,8 @@ query = SELECT DISTINCT username FROM mail_users WHERE email in ((SELECT mail_vi
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/postfix/mysql-virtual_uid_maps.cf" chown="root:postfix" <file name="/etc/postfix/mysql-virtual_uid_maps.cf"
chmod="0640"> chown="root:postfix" chmod="0640">
<content><![CDATA[ <content><![CDATA[
user = <SQL_UNPRIVILEGED_USER> user = <SQL_UNPRIVILEGED_USER>
password = <SQL_UNPRIVILEGED_PASSWORD> password = <SQL_UNPRIVILEGED_PASSWORD>
@@ -1552,8 +1554,8 @@ query = SELECT uid FROM mail_users WHERE email = '%s'
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/postfix/mysql-virtual_gid_maps.cf" chown="root:postfix" <file name="/etc/postfix/mysql-virtual_gid_maps.cf"
chmod="0640"> chown="root:postfix" chmod="0640">
<content><![CDATA[ <content><![CDATA[
user = <SQL_UNPRIVILEGED_USER> user = <SQL_UNPRIVILEGED_USER>
password = <SQL_UNPRIVILEGED_PASSWORD> password = <SQL_UNPRIVILEGED_PASSWORD>
@@ -1602,8 +1604,8 @@ root: root@<SERVERNAME>
</include> </include>
<include>//service[@type='smtp']/general/commands[@index=2] <include>//service[@type='smtp']/general/commands[@index=2]
</include> </include>
<file name="/etc/postfix/main.cf" chown="root:root" chmod="0644" <file name="/etc/postfix/main.cf" chown="root:root"
backup="true"> chmod="0644" backup="true">
<content><![CDATA[ <content><![CDATA[
# Postfix programs paths settings # Postfix programs paths settings
command_directory = /usr/sbin command_directory = /usr/sbin
@@ -1727,8 +1729,8 @@ debugger_command =
</content> </content>
</file> </file>
<include>//service[@type='smtp']/general/files[@index=0]</include> <include>//service[@type='smtp']/general/files[@index=0]</include>
<file name="/etc/postfix/master.cf" chown="root:root" chmod="0644" <file name="/etc/postfix/master.cf" chown="root:root"
backup="true" mode="append"> chmod="0644" backup="true" mode="append">
<content><![CDATA[ <content><![CDATA[
# Add this lines to be able to use dovecot as delivery agent # Add this lines to be able to use dovecot as delivery agent
# Dovecot LDA # Dovecot LDA
@@ -1750,8 +1752,8 @@ dovecot unix - n n - - pipe
</include> </include>
<include>//service[@type='smtp']/general/commands[@index=2] <include>//service[@type='smtp']/general/commands[@index=2]
</include> </include>
<file name="/etc/postfix/main.cf" chown="root:root" chmod="0644" <file name="/etc/postfix/main.cf" chown="root:root"
backup="true"> chmod="0644" backup="true">
<content><![CDATA[ <content><![CDATA[
# Postfix programs paths settings # Postfix programs paths settings
command_directory = /usr/sbin command_directory = /usr/sbin
@@ -1880,8 +1882,8 @@ debugger_command =
</content> </content>
</file> </file>
<include>//service[@type='smtp']/general/files[@index=0]</include> <include>//service[@type='smtp']/general/files[@index=0]</include>
<file name="/etc/postfix/master.cf" chown="root:root" chmod="0644" <file name="/etc/postfix/master.cf" chown="root:root"
backup="true" mode="append"> chmod="0644" backup="true" mode="append">
<content><![CDATA[ <content><![CDATA[
# Add this lines to be able to use dovecot as delivery agent # Add this lines to be able to use dovecot as delivery agent
# Dovecot LDA # Dovecot LDA
@@ -1903,8 +1905,8 @@ dovecot unix - n n - - pipe
</include> </include>
<include>//service[@type='smtp']/general/commands[@index=2] <include>//service[@type='smtp']/general/commands[@index=2]
</include> </include>
<file name="/etc/postfix/main.cf" chown="root:root" chmod="0644" <file name="/etc/postfix/main.cf" chown="root:root"
backup="true"> chmod="0644" backup="true">
<content><![CDATA[ <content><![CDATA[
# Postfix programs paths settings # Postfix programs paths settings
command_directory = /usr/sbin command_directory = /usr/sbin
@@ -2000,7 +2002,8 @@ debugger_command =
</content> </content>
</file> </file>
<include>//service[@type='smtp']/general/files[@index=0]</include> <include>//service[@type='smtp']/general/files[@index=0]</include>
<file name="/etc/sasl2/smtpd.conf" chown="root:root" chmod="0600"> <file name="/etc/sasl2/smtpd.conf" chown="root:root"
chmod="0600">
<content><![CDATA[ <content><![CDATA[
pwcheck_method: auxprop pwcheck_method: auxprop
auxprop_plugin: sql auxprop_plugin: sql
@@ -2024,7 +2027,8 @@ sql_select: SELECT password_enc FROM mail_users WHERE username='%u@%r' OR email=
<!-- IMAP/POP3 services --> <!-- IMAP/POP3 services -->
<service type="mail" title="{{lng.admin.configfiles.mail}}"> <service type="mail" title="{{lng.admin.configfiles.mail}}">
<!-- Dovecot --> <!-- Dovecot -->
<daemon name="dovecot" version="2" title="Dovecot" default="true"> <daemon name="dovecot" version="2" title="Dovecot"
default="true">
<command><![CDATA[echo "net-mail/dovecot mysql managesieve sieve" >> /etc/portage/package.use]]></command> <command><![CDATA[echo "net-mail/dovecot mysql managesieve sieve" >> /etc/portage/package.use]]></command>
<install><![CDATA[emerge net-mail/dovecot]]></install> <install><![CDATA[emerge net-mail/dovecot]]></install>
<file name="/etc/dovecot/dovecot.conf" chown="root:root" <file name="/etc/dovecot/dovecot.conf" chown="root:root"
@@ -2132,8 +2136,8 @@ protocol lda {
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/dovecot/dovecot-sql.conf.ext" chown="root:root" <file name="/etc/dovecot/dovecot-sql.conf.ext"
chmod="0600" backup="true"> chown="root:root" chmod="0600" backup="true">
<content><![CDATA[ <content><![CDATA[
driver = mysql driver = mysql
connect = host=<SQL_HOST> dbname=<SQL_DB> user=<SQL_UNPRIVILEGED_USER> password=<SQL_UNPRIVILEGED_PASSWORD> connect = host=<SQL_HOST> dbname=<SQL_DB> user=<SQL_UNPRIVILEGED_USER> password=<SQL_UNPRIVILEGED_PASSWORD>
@@ -2144,8 +2148,8 @@ iterate_query = "SELECT username AS user FROM mail_users WHERE (imap = 1 OR pop3
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/dovecot/conf.d/20-managesieve.conf" chown="root:root" <file name="/etc/dovecot/conf.d/20-managesieve.conf"
chmod="0644" backup="true"> chown="root:root" chmod="0644" backup="true">
<content><![CDATA[ <content><![CDATA[
## ##
## ManageSieve specific settings ## ManageSieve specific settings
@@ -2226,8 +2230,8 @@ protocol sieve {
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/dovecot/conf.d/90-sieve.conf" chown="root:root" <file name="/etc/dovecot/conf.d/90-sieve.conf"
chmod="0644" backup="true"> chown="root:root" chmod="0644" backup="true">
<content><![CDATA[ <content><![CDATA[
## ##
## Settings for the Sieve interpreter ## Settings for the Sieve interpreter
@@ -2496,8 +2500,8 @@ MYSQL_AUXOPTIONS_FIELD CONCAT("allowimap=",imap,",allowpop3=",pop3)
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/courier-imap/pop3d" chown="root:0" chmod="0600" <file name="/etc/courier-imap/pop3d" chown="root:0"
backup="true"> chmod="0600" backup="true">
<content><![CDATA[ <content><![CDATA[
##VERSION: $Id: pop3d.dist.in,v 1.11 2004/10/30 15:39:38 mrsam Exp $ ##VERSION: $Id: pop3d.dist.in,v 1.11 2004/10/30 15:39:38 mrsam Exp $
# #
@@ -2629,8 +2633,8 @@ PRERUN=
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/courier-imap/imapd" chown="root:0" chmod="0600" <file name="/etc/courier-imap/imapd" chown="root:0"
backup="true"> chmod="0600" backup="true">
<content><![CDATA[ <content><![CDATA[
##VERSION: $Id: imapd.dist.in,v 1.32 2004/11/25 04:57:04 mrsam Exp $ ##VERSION: $Id: imapd.dist.in,v 1.32 2004/11/25 04:57:04 mrsam Exp $
# #
@@ -3011,8 +3015,8 @@ PRERUN=
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/courier-imap/pop3d-ssl" chown="root:0" chmod="0600" <file name="/etc/courier-imap/pop3d-ssl" chown="root:0"
backup="true"> chmod="0600" backup="true">
<content><![CDATA[ <content><![CDATA[
##VERSION: $Id: pop3d-ssl.dist.in,v 1.12 2004/10/21 00:45:35 mrsam Exp $ ##VERSION: $Id: pop3d-ssl.dist.in,v 1.12 2004/10/21 00:45:35 mrsam Exp $
# #
@@ -3203,8 +3207,8 @@ MAILDIRPATH=.maildir
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/courier-imap/imapd-ssl" chown="root:0" chmod="0600" <file name="/etc/courier-imap/imapd-ssl" chown="root:0"
backup="true"> chmod="0600" backup="true">
<content><![CDATA[ <content><![CDATA[
##VERSION: $Id: imapd-ssl.dist.in,v 1.11 2004/10/21 00:45:35 mrsam Exp $ ##VERSION: $Id: imapd-ssl.dist.in,v 1.11 2004/10/21 00:45:35 mrsam Exp $
# #
@@ -3422,7 +3426,8 @@ MAILDIRPATH=.maildir
<daemon name="proftpd" title="ProFTPd" default="true"> <daemon name="proftpd" title="ProFTPd" default="true">
<command><![CDATA[echo "net-ftp/proftpd mysql" >> /etc/portage/package.use]]></command> <command><![CDATA[echo "net-ftp/proftpd mysql" >> /etc/portage/package.use]]></command>
<install><![CDATA[emerge net-ftp/proftpd]]></install> <install><![CDATA[emerge net-ftp/proftpd]]></install>
<file name="/etc/proftpd/create-cert.sh" chown="root:0" chmod="0700"> <file name="/etc/proftpd/create-cert.sh" chown="root:0"
chmod="0700">
<content><![CDATA[#!/bin/bash <content><![CDATA[#!/bin/bash
[ -f /etc/ssl/certs/proftpd.crt ] || openssl req -new -x509 -newkey rsa:4096 -days 3650 -nodes -out /etc/ssl/certs/proftpd.crt -keyout /etc/ssl/private/proftpd.key -subj "/C=US/ST=Some-State/O=Internet Widgits Pty Ltd/CN=<SERVERNAME>" [ -f /etc/ssl/certs/proftpd.crt ] || openssl req -new -x509 -newkey rsa:4096 -days 3650 -nodes -out /etc/ssl/certs/proftpd.crt -keyout /etc/ssl/private/proftpd.key -subj "/C=US/ST=Some-State/O=Internet Widgits Pty Ltd/CN=<SERVERNAME>"
[ -f /etc/ssl/certs/proftpd_ec.crt ] || openssl req -new -x509 -nodes -newkey ec:<(openssl ecparam -name secp521r1) -keyout /etc/ssl/private/proftpd_ec.key -out /etc/ssl/certs/proftpd_ec.crt -days 3650 -subj "/C=US/ST=Some-State/O=Internet Widgits Pty Ltd/CN=<SERVERNAME>" [ -f /etc/ssl/certs/proftpd_ec.crt ] || openssl req -new -x509 -nodes -newkey ec:<(openssl ecparam -name secp521r1) -keyout /etc/ssl/private/proftpd_ec.key -out /etc/ssl/certs/proftpd_ec.crt -days 3650 -subj "/C=US/ST=Some-State/O=Internet Widgits Pty Ltd/CN=<SERVERNAME>"
@@ -3434,8 +3439,8 @@ chmod 0600 /etc/ssl/private/proftpd.key /etc/ssl/private/proftpd_ec.key
<command><![CDATA[/etc/proftpd/create-cert.sh]]></command> <command><![CDATA[/etc/proftpd/create-cert.sh]]></command>
<command><![CDATA[rm -f /etc/proftpd/create-cert.sh]]></command> <command><![CDATA[rm -f /etc/proftpd/create-cert.sh]]></command>
</commands> </commands>
<file name="/etc/proftpd/proftpd.conf" chown="root:0" chmod="0600" <file name="/etc/proftpd/proftpd.conf" chown="root:0"
backup="true"> chmod="0600" backup="true">
<content><![CDATA[ <content><![CDATA[
# Server settings # Server settings
ServerName "<SERVERNAME> FTP Server" ServerName "<SERVERNAME> FTP Server"
@@ -3582,8 +3587,8 @@ MISC_OTHER="-A -x -j -Z"
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/pureftpd-mysql.conf" chown="root:0" chmod="0600" <file name="/etc/pureftpd-mysql.conf" chown="root:0"
backup="true"> chmod="0600" backup="true">
<content><![CDATA[ <content><![CDATA[
MYSQLServer <SQL_HOST> MYSQLServer <SQL_HOST>
#MYSQLPort 3306 #MYSQLPort 3306
@@ -3607,8 +3612,8 @@ MySQLGetQTASZ SELECT panel_customers.diskspace/1024 AS QuotaSize FROM panel_cu
<daemon name="vsftpd" title="vsftpd"> <daemon name="vsftpd" title="vsftpd">
<command><![CDATA[echo "net-ftp/vsftpd pam" >> /etc/portage/package.use]]></command> <command><![CDATA[echo "net-ftp/vsftpd pam" >> /etc/portage/package.use]]></command>
<install><![CDATA[emerge net-ftp/vsftpd sys-auth/pam_mysql]]></install> <install><![CDATA[emerge net-ftp/vsftpd sys-auth/pam_mysql]]></install>
<file name="/etc/vsftpd/vsftpd.conf" chown="root:root" chmod="0644" <file name="/etc/vsftpd/vsftpd.conf" chown="root:root"
backup="true"> chmod="0644" backup="true">
<content><![CDATA[ <content><![CDATA[
listen=YES listen=YES
#listen_ipv6=YES #listen_ipv6=YES
@@ -3680,7 +3685,8 @@ account required pam_mysql.so user=<SQL_UNPRIVILEGED_USER> passwd=<SQL_UN
<!-- System tools/services --> <!-- System tools/services -->
<service type="system" title="{{lng.admin.configfiles.etc}}"> <service type="system" title="{{lng.admin.configfiles.etc}}">
<!-- Cronjob --> <!-- Cronjob -->
<daemon name="cron" title="Cronjob for froxlor" mandatory="true"> <daemon name="cron" title="Cronjob for froxlor"
mandatory="true">
<file name="/etc/cron.d/froxlor" chown="root:0" chmod="0640"> <file name="/etc/cron.d/froxlor" chown="root:0" chmod="0640">
<content><![CDATA[ <content><![CDATA[
# #
@@ -3699,17 +3705,19 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin
<command><![CDATA[{{settings.system.crondreload}}]]></command> <command><![CDATA[{{settings.system.crondreload}}]]></command>
</daemon> </daemon>
<!-- AWstats --> <!-- AWstats -->
<daemon name="awstats" title="Awstats (webalizer alternative)"> <daemon name="awstats"
title="Awstats (webalizer alternative)">
<install><![CDATA[emerge www-misc/awstats]]></install> <install><![CDATA[emerge www-misc/awstats]]></install>
<command><![CDATA[sed -i.bak 's/^DirData/# DirData/' {{settings.system.awstats_conf}}/awstats.model.conf]]></command> <command><![CDATA[sed -i.bak 's/^DirData/# DirData/' {{settings.system.awstats_conf}}/awstats.model.conf]]></command>
<command><![CDATA[sed -i.bak 's|^\\(DirIcons=\\).*$|\\1\\"/awstats-icon\\"|' {{settings.system.awstats_conf}}/awstats.model.conf]]></command> <command><![CDATA[sed -i.bak 's|^\\(DirIcons=\\).*$|\\1\\"/awstats-icon\\"|' {{settings.system.awstats_conf}}/awstats.model.conf]]></command>
<command><![CDATA[rm /etc/cron.d/awstats]]></command> <command><![CDATA[rm /etc/cron.d/awstats]]></command>
</daemon> </daemon>
<!-- libnss-mysql --> <!-- libnss-mysql -->
<daemon name="libnss" title="libnss-mysql (required for FCGID/php-fpm/mpm-itk)"> <daemon name="libnss"
title="libnss-mysql (required for FCGID/php-fpm/mpm-itk)">
<install><![CDATA[emerge sys-auth/libnss-mysql]]></install> <install><![CDATA[emerge sys-auth/libnss-mysql]]></install>
<file name="/etc/libnss-mysql.cfg" chown="root:root" chmod="0600" <file name="/etc/libnss-mysql.cfg" chown="root:root"
backup="true"> chmod="0600" backup="true">
<content><![CDATA[ <content><![CDATA[
getpwnam SELECT username,'x',uid,gid,'Froxlor Customer',homedir,shell \ getpwnam SELECT username,'x',uid,gid,'Froxlor Customer',homedir,shell \
FROM ftp_users \ FROM ftp_users \
@@ -3804,7 +3812,8 @@ aliases: files
<!-- Logrotate --> <!-- Logrotate -->
<daemon name="logrotate" title="Logrotate"> <daemon name="logrotate" title="Logrotate">
<install><![CDATA[emerge app-admin/logrotate]]></install> <install><![CDATA[emerge app-admin/logrotate]]></install>
<file name="/etc/logrotate.d/froxlor" chown="root:root" chmod="0644"> <file name="/etc/logrotate.d/froxlor" chown="root:root"
chmod="0644">
<content><![CDATA[ <content><![CDATA[
# #
# Froxlor logrotate snipet # Froxlor logrotate snipet
@@ -3863,7 +3872,8 @@ aliases: files
<command><![CDATA[php {{const.\Froxlor\Froxlor::getInstallDir()}}/scripts/froxlor_master_cronjob.php --force]]></command> <command><![CDATA[php {{const.\Froxlor\Froxlor::getInstallDir()}}/scripts/froxlor_master_cronjob.php --force]]></command>
</daemon> </daemon>
<!-- PHP-FPM --> <!-- PHP-FPM -->
<daemon name="php-fpm" title="PHP-FPM (alternative to mod_php)"> <daemon name="php-fpm"
title="PHP-FPM (alternative to mod_php)">
<command><![CDATA[echo "dev-lang/php fpm" >> /etc/portage/package.use]]></command> <command><![CDATA[echo "dev-lang/php fpm" >> /etc/portage/package.use]]></command>
<install><![CDATA[emerge dev-lang/php sys-auth/libnss-mysql]]></install> <install><![CDATA[emerge dev-lang/php sys-auth/libnss-mysql]]></install>
<commands index="1"> <commands index="1">

View File

@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<froxlor> <froxlor>
<distribution name="Debian" codename="Jessie" version="8.x" defaulteditor="/usr/bin/nano"> <distribution name="Debian" codename="Jessie"
version="8.x" defaulteditor="/usr/bin/nano">
<services> <services>
<!-- HTTP --> <!-- HTTP -->
<service type="http" title="{{lng.admin.configfiles.http}}"> <service type="http" title="{{lng.admin.configfiles.http}}">
@@ -43,7 +44,8 @@
</commands> </commands>
</general> </general>
<!-- HTTP Apache --> <!-- HTTP Apache -->
<daemon name="apache" version="2.4" title="Apache 2.4" default="true"> <daemon name="apache" version="2.4" title="Apache 2.4"
default="true">
<install><![CDATA[apt-get install apache2]]></install> <install><![CDATA[apt-get install apache2]]></install>
<include>//service[@type='http']/general/commands</include> <include>//service[@type='http']/general/commands</include>
<command><![CDATA[a2dismod userdir]]></command> <command><![CDATA[a2dismod userdir]]></command>
@@ -904,8 +906,8 @@ include-dir=/etc/powerdns/froxlor/
</content> </content>
</file> </file>
<command><![CDATA[mkdir -p /etc/powerdns/froxlor/]]></command> <command><![CDATA[mkdir -p /etc/powerdns/froxlor/]]></command>
<file name="/etc/powerdns/froxlor/pdns_froxlor.conf" chown="root:root" <file name="/etc/powerdns/froxlor/pdns_froxlor.conf"
chmod="600"> chown="root:root" chmod="600">
<content><![CDATA[ <content><![CDATA[
# mysql-settings / you need to create the power-dns database for yourself! # mysql-settings / you need to create the power-dns database for yourself!
launch=gmysql launch=gmysql
@@ -920,7 +922,8 @@ gmysql-password=
</file> </file>
<command><![CDATA[/etc/init.d/pdns restart]]></command> <command><![CDATA[/etc/init.d/pdns restart]]></command>
</daemon> </daemon>
<daemon name="powerdns_bind" title="PowerDNS via bind-backend"> <daemon name="powerdns_bind"
title="PowerDNS via bind-backend">
<install><![CDATA[apt-get install pdns-server]]></install> <install><![CDATA[apt-get install pdns-server]]></install>
<file name="/etc/powerdns/pdns.conf" backup="true" chmod="600"> <file name="/etc/powerdns/pdns.conf" backup="true" chmod="600">
<content><![CDATA[ <content><![CDATA[
@@ -1447,8 +1450,8 @@ include-dir=/etc/powerdns/froxlor/
</content> </content>
</file> </file>
<command><![CDATA[mkdir -p /etc/powerdns/froxlor/]]></command> <command><![CDATA[mkdir -p /etc/powerdns/froxlor/]]></command>
<file name="/etc/powerdns/froxlor/pdns_froxlor.conf" chown="root:root" <file name="/etc/powerdns/froxlor/pdns_froxlor.conf"
chmod="600"> chown="root:root" chmod="600">
<content><![CDATA[ <content><![CDATA[
# Bind backend configuration # Bind backend configuration
@@ -1494,8 +1497,8 @@ bind-check-interval=180
<command><![CDATA[chmod 0750 {{settings.system.vmail_homedir}}]]></command> <command><![CDATA[chmod 0750 {{settings.system.vmail_homedir}}]]></command>
</commands> </commands>
<files index="0"> <files index="0">
<file name="/etc/postfix/mysql-virtual_alias_maps.cf" chown="root:postfix" <file name="/etc/postfix/mysql-virtual_alias_maps.cf"
chmod="0640"> chown="root:postfix" chmod="0640">
<content><![CDATA[ <content><![CDATA[
user = <SQL_UNPRIVILEGED_USER> user = <SQL_UNPRIVILEGED_USER>
password = <SQL_UNPRIVILEGED_PASSWORD> password = <SQL_UNPRIVILEGED_PASSWORD>
@@ -1539,8 +1542,8 @@ query = SELECT DISTINCT username FROM mail_users WHERE email in ((SELECT mail_vi
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/postfix/mysql-virtual_uid_maps.cf" chown="root:postfix" <file name="/etc/postfix/mysql-virtual_uid_maps.cf"
chmod="0640"> chown="root:postfix" chmod="0640">
<content><![CDATA[ <content><![CDATA[
user = <SQL_UNPRIVILEGED_USER> user = <SQL_UNPRIVILEGED_USER>
password = <SQL_UNPRIVILEGED_PASSWORD> password = <SQL_UNPRIVILEGED_PASSWORD>
@@ -1551,8 +1554,8 @@ query = SELECT uid FROM mail_users WHERE email = '%s'
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/postfix/mysql-virtual_gid_maps.cf" chown="root:postfix" <file name="/etc/postfix/mysql-virtual_gid_maps.cf"
chmod="0640"> chown="root:postfix" chmod="0640">
<content><![CDATA[ <content><![CDATA[
user = <SQL_UNPRIVILEGED_USER> user = <SQL_UNPRIVILEGED_USER>
password = <SQL_UNPRIVILEGED_PASSWORD> password = <SQL_UNPRIVILEGED_PASSWORD>
@@ -1599,8 +1602,8 @@ root: root@<SERVERNAME>
</include> </include>
<include>//service[@type='smtp']/general/commands[@index=2] <include>//service[@type='smtp']/general/commands[@index=2]
</include> </include>
<file name="/etc/postfix/main.cf" chown="root:root" chmod="0644" <file name="/etc/postfix/main.cf" chown="root:root"
backup="true"> chmod="0644" backup="true">
<content><![CDATA[ <content><![CDATA[
# Global Postfix configuration file. This file lists only a subset # Global Postfix configuration file. This file lists only a subset
# of all parameters. For the syntax, and for a complete parameter # of all parameters. For the syntax, and for a complete parameter
@@ -2325,8 +2328,8 @@ virtual_mailbox_limit = 0
</content> </content>
</file> </file>
<include>//service[@type='smtp']/general/files[@index=0]</include> <include>//service[@type='smtp']/general/files[@index=0]</include>
<file name="/etc/postfix/master.cf" chown="root:root" chmod="0644" <file name="/etc/postfix/master.cf" chown="root:root"
backup="true"> chmod="0644" backup="true">
<content><![CDATA[ <content><![CDATA[
# #
# Postfix master process configuration file. For details on the format # Postfix master process configuration file. For details on the format
@@ -2577,8 +2580,8 @@ dict {
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/dovecot/dovecot-sql.conf.ext" chown="root:root" <file name="/etc/dovecot/dovecot-sql.conf.ext"
chmod="0600" backup="true"> chown="root:root" chmod="0600" backup="true">
<content><![CDATA[ <content><![CDATA[
# This file is commonly accessed via passdb {} or userdb {} section in # This file is commonly accessed via passdb {} or userdb {} section in
# conf.d/auth-sql.conf.ext # conf.d/auth-sql.conf.ext
@@ -3237,8 +3240,8 @@ mail_access_groups = vmail
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/dovecot/conf.d/10-master.conf" chown="root:0" <file name="/etc/dovecot/conf.d/10-master.conf"
chmod="0644" backup="true"> chown="root:0" chmod="0644" backup="true">
<content><![CDATA[ <content><![CDATA[
#default_process_limit = 100 #default_process_limit = 100
#default_client_limit = 1000 #default_client_limit = 1000
@@ -3492,8 +3495,8 @@ protocol imap {
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/dovecot/conf.d/20-managesieve.conf" chown="root:0" <file name="/etc/dovecot/conf.d/20-managesieve.conf"
chmod="0644" backup="true"> chown="root:0" chmod="0644" backup="true">
<content><![CDATA[ <content><![CDATA[
## ##
## ManageSieve specific settings ## ManageSieve specific settings
@@ -3795,8 +3798,8 @@ plugin {
</commands> </commands>
</general> </general>
<!-- Dovecot with postfix --> <!-- Dovecot with postfix -->
<daemon name="dovecot_postfix" version="2" title="Dovecot with postfix" <daemon name="dovecot_postfix" version="2"
default="true"> title="Dovecot with postfix" default="true">
<include>//service[@type='mail']/general/installs[@index=1] <include>//service[@type='mail']/general/installs[@index=1]
</include> </include>
<include>//service[@type='mail']/general/files[@index=1] <include>//service[@type='mail']/general/files[@index=1]
@@ -3805,7 +3808,8 @@ plugin {
</include> </include>
</daemon> </daemon>
<!-- Dovecot with exim4 --> <!-- Dovecot with exim4 -->
<daemon name="dovecot_exim4" version="2" title="Dovecot with exim4"> <daemon name="dovecot_exim4" version="2"
title="Dovecot with exim4">
<include>//service[@type='mail']/general/installs[@index=1] <include>//service[@type='mail']/general/installs[@index=1]
</include> </include>
<include>//service[@type='mail']/general/files[@index=1] <include>//service[@type='mail']/general/files[@index=1]
@@ -3819,7 +3823,8 @@ plugin {
<!-- Proftpd --> <!-- Proftpd -->
<daemon name="proftpd" title="ProFTPd" default="true"> <daemon name="proftpd" title="ProFTPd" default="true">
<install><![CDATA[apt-get install proftpd-basic proftpd-mod-mysql]]></install> <install><![CDATA[apt-get install proftpd-basic proftpd-mod-mysql]]></install>
<file name="/etc/proftpd/create-cert.sh" chown="root:0" chmod="0700"> <file name="/etc/proftpd/create-cert.sh" chown="root:0"
chmod="0700">
<content><![CDATA[#!/bin/bash <content><![CDATA[#!/bin/bash
[ -f /etc/ssl/certs/proftpd.crt ] || openssl req -new -x509 -newkey rsa:4096 -days 3650 -nodes -out /etc/ssl/certs/proftpd.crt -keyout /etc/ssl/private/proftpd.key -subj "/C=US/ST=Some-State/O=Internet Widgits Pty Ltd/CN=<SERVERNAME>" [ -f /etc/ssl/certs/proftpd.crt ] || openssl req -new -x509 -newkey rsa:4096 -days 3650 -nodes -out /etc/ssl/certs/proftpd.crt -keyout /etc/ssl/private/proftpd.key -subj "/C=US/ST=Some-State/O=Internet Widgits Pty Ltd/CN=<SERVERNAME>"
[ -f /etc/ssl/certs/proftpd_ec.crt ] || openssl req -new -x509 -nodes -newkey ec:<(openssl ecparam -name secp521r1) -keyout /etc/ssl/private/proftpd_ec.key -out /etc/ssl/certs/proftpd_ec.crt -days 3650 -subj "/C=US/ST=Some-State/O=Internet Widgits Pty Ltd/CN=<SERVERNAME>" [ -f /etc/ssl/certs/proftpd_ec.crt ] || openssl req -new -x509 -nodes -newkey ec:<(openssl ecparam -name secp521r1) -keyout /etc/ssl/private/proftpd_ec.key -out /etc/ssl/certs/proftpd_ec.crt -days 3650 -subj "/C=US/ST=Some-State/O=Internet Widgits Pty Ltd/CN=<SERVERNAME>"
@@ -3831,8 +3836,8 @@ chmod 0600 /etc/ssl/private/proftpd.key /etc/ssl/private/proftpd_ec.key
<command><![CDATA[/etc/proftpd/create-cert.sh]]></command> <command><![CDATA[/etc/proftpd/create-cert.sh]]></command>
<command><![CDATA[rm -f /etc/proftpd/create-cert.sh]]></command> <command><![CDATA[rm -f /etc/proftpd/create-cert.sh]]></command>
</commands> </commands>
<file name="/etc/proftpd/proftpd.conf" chown="root:0" chmod="0600" <file name="/etc/proftpd/proftpd.conf" chown="root:0"
backup="true"> chmod="0600" backup="true">
<content><![CDATA[ <content><![CDATA[
# #
# /etc/proftpd/proftpd.conf -- This is a basic ProFTPD configuration file. # /etc/proftpd/proftpd.conf -- This is a basic ProFTPD configuration file.
@@ -4026,8 +4031,8 @@ Include /etc/proftpd/conf.d/
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/proftpd/modules.conf" chown="root:0" chmod="0644" <file name="/etc/proftpd/modules.conf" chown="root:0"
backup="true"> chmod="0644" backup="true">
<content><![CDATA[ <content><![CDATA[
# #
# This file is used to manage DSO modules and features. # This file is used to manage DSO modules and features.
@@ -4194,7 +4199,8 @@ SQLNamedQuery insert-quota-tally INSERT "%{0}, %{1}, %{2}, %{3}, %{4},%{5}, %{6}
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/proftpd/tls.conf" chown="root:root" chmod="0644" backup="true"> <file name="/etc/proftpd/tls.conf" chown="root:root"
chmod="0644" backup="true">
<content><![CDATA[ <content><![CDATA[
<IfModule mod_tls.c> <IfModule mod_tls.c>
TLSEngine on TLSEngine on
@@ -4226,14 +4232,15 @@ TLSVerifyClient off
<!-- Pureftpd --> <!-- Pureftpd -->
<daemon name="pureftpd" title="PureFTPd"> <daemon name="pureftpd" title="PureFTPd">
<install><![CDATA[apt-get install pure-ftpd-common pure-ftpd-mysql]]></install> <install><![CDATA[apt-get install pure-ftpd-common pure-ftpd-mysql]]></install>
<file name="/etc/pure-ftpd/conf/MinUID" chown="root:0" chmod="0644"> <file name="/etc/pure-ftpd/conf/MinUID" chown="root:0"
chmod="0644">
<content><![CDATA[ <content><![CDATA[
1000 1000
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/pure-ftpd/conf/MySQLConfigFile" chown="root:0" <file name="/etc/pure-ftpd/conf/MySQLConfigFile"
chmod="0644"> chown="root:0" chmod="0644">
<content><![CDATA[ <content><![CDATA[
/etc/pure-ftpd/db/mysql.conf /etc/pure-ftpd/db/mysql.conf
]]> ]]>
@@ -4260,8 +4267,8 @@ yes
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/pure-ftpd/conf/PAMAuthentication" chown="root:0" <file name="/etc/pure-ftpd/conf/PAMAuthentication"
chmod="0644"> chown="root:0" chmod="0644">
<content><![CDATA[ <content><![CDATA[
no no
]]> ]]>
@@ -4407,7 +4414,8 @@ MySQLGetQTASZ SELECT panel_customers.diskspace/1024 AS QuotaSize FROM panel_cus
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/pure-ftpd/conf/Bind" chown="root:0" chmod="0644"> <file name="/etc/pure-ftpd/conf/Bind" chown="root:0"
chmod="0644">
<content><![CDATA[ <content><![CDATA[
21 21
]]> ]]>
@@ -4451,7 +4459,8 @@ UPLOADGID=
<!-- System tools/services --> <!-- System tools/services -->
<service type="system" title="{{lng.admin.configfiles.etc}}"> <service type="system" title="{{lng.admin.configfiles.etc}}">
<!-- Cronjob --> <!-- Cronjob -->
<daemon name="cron" title="Cronjob for froxlor" mandatory="true"> <daemon name="cron" title="Cronjob for froxlor"
mandatory="true">
<file name="/etc/cron.d/froxlor" chown="root:0" chmod="0640"> <file name="/etc/cron.d/froxlor" chown="root:0" chmod="0640">
<content><![CDATA[ <content><![CDATA[
# #
@@ -4470,7 +4479,8 @@ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
<command><![CDATA[{{settings.system.crondreload}}]]></command> <command><![CDATA[{{settings.system.crondreload}}]]></command>
</daemon> </daemon>
<!-- AWstats --> <!-- AWstats -->
<daemon name="awstats" title="Awstats (webalizer alternative)"> <daemon name="awstats"
title="Awstats (webalizer alternative)">
<install><![CDATA[apt-get install awstats]]></install> <install><![CDATA[apt-get install awstats]]></install>
<command><![CDATA[cp /usr/share/awstats/tools/awstats_buildstaticpages.pl {{settings.system.awstats_path}}]]></command> <command><![CDATA[cp /usr/share/awstats/tools/awstats_buildstaticpages.pl {{settings.system.awstats_path}}]]></command>
<command><![CDATA[mv {{settings.system.awstats_conf}}/awstats.conf {{settings.system.awstats_conf}}/awstats.model.conf]]></command> <command><![CDATA[mv {{settings.system.awstats_conf}}/awstats.conf {{settings.system.awstats_conf}}/awstats.model.conf]]></command>
@@ -4479,14 +4489,15 @@ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
<command><![CDATA[rm /etc/cron.d/awstats]]></command> <command><![CDATA[rm /etc/cron.d/awstats]]></command>
</daemon> </daemon>
<!-- libnss-mysql --> <!-- libnss-mysql -->
<daemon name="libnss" title="libnss-mysql (required for FCGID/php-fpm/mpm-itk)"> <daemon name="libnss"
title="libnss-mysql (required for FCGID/php-fpm/mpm-itk)">
<install><![CDATA[apt-get install nscd <install><![CDATA[apt-get install nscd
wget http://debian.froxlor.org/pool/main/libn/libnss-mysql-bg/libnss-mysql-bg_1.5-3+frx1_amd64.deb wget http://debian.froxlor.org/pool/main/libn/libnss-mysql-bg/libnss-mysql-bg_1.5-3+frx1_amd64.deb
dpkg -i libnss-mysql-bg_1.5-3+frx1_amd64.deb dpkg -i libnss-mysql-bg_1.5-3+frx1_amd64.deb
rm libnss-mysql-bg_1.5-3+frx1_amd64.deb rm libnss-mysql-bg_1.5-3+frx1_amd64.deb
]]></install> ]]></install>
<file name="/etc/libnss-mysql.cfg" chown="root:root" chmod="0600" <file name="/etc/libnss-mysql.cfg" chown="root:root"
backup="true"> chmod="0600" backup="true">
<content><![CDATA[ <content><![CDATA[
getpwnam SELECT username,'x',uid,gid,'Froxlor Customer',homedir,shell \ getpwnam SELECT username,'x',uid,gid,'Froxlor Customer',homedir,shell \
FROM ftp_users \ FROM ftp_users \
@@ -4584,7 +4595,8 @@ aliases: files
<visibility mode="notisdir">/etc/insserv/overrides</visibility> <visibility mode="notisdir">/etc/insserv/overrides</visibility>
<content><![CDATA[mkdir -p /etc/insserv/overrides]]></content> <content><![CDATA[mkdir -p /etc/insserv/overrides]]></content>
</command> </command>
<file name="/etc/insserv/overrides/apache2" chown="root:root" chmod="0644"> <file name="/etc/insserv/overrides/apache2" chown="root:root"
chmod="0644">
<visibility mode="equals" value="apache2">{{settings.system.webserver}}</visibility> <visibility mode="equals" value="apache2">{{settings.system.webserver}}</visibility>
<content><![CDATA[ <content><![CDATA[
#!/bin/sh #!/bin/sh
@@ -4599,7 +4611,8 @@ aliases: files
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/insserv/overrides/lighttpd" chown="root:root" chmod="0644"> <file name="/etc/insserv/overrides/lighttpd" chown="root:root"
chmod="0644">
<visibility mode="equals" value="lighttpd">{{settings.system.webserver}}</visibility> <visibility mode="equals" value="lighttpd">{{settings.system.webserver}}</visibility>
<content><![CDATA[ <content><![CDATA[
#!/bin/sh #!/bin/sh
@@ -4616,7 +4629,8 @@ aliases: files
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/insserv/overrides/nginx" chown="root:root" chmod="0644"> <file name="/etc/insserv/overrides/nginx" chown="root:root"
chmod="0644">
<visibility mode="equals" value="nginx">{{settings.system.webserver}}</visibility> <visibility mode="equals" value="nginx">{{settings.system.webserver}}</visibility>
<content><![CDATA[ <content><![CDATA[
#!/bin/sh #!/bin/sh
@@ -4631,7 +4645,8 @@ aliases: files
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/insserv/overrides/nscd" chown="root:root" chmod="0644"> <file name="/etc/insserv/overrides/nscd" chown="root:root"
chmod="0644">
<content><![CDATA[ <content><![CDATA[
#!/bin/sh #!/bin/sh
### BEGIN INIT INFO ### BEGIN INIT INFO
@@ -4647,7 +4662,8 @@ aliases: files
</file> </file>
</daemon> </daemon>
<!-- libnss-extrausers --> <!-- libnss-extrausers -->
<daemon name="libnssextrausers" title="libnss-extrausers (alternative to libnss-mysql, required for FCGID/php-fpm/mpm-itk)"> <daemon name="libnssextrausers"
title="libnss-extrausers (alternative to libnss-mysql, required for FCGID/php-fpm/mpm-itk)">
<install><![CDATA[apt-get install nscd libnss-extrausers]]></install> <install><![CDATA[apt-get install nscd libnss-extrausers]]></install>
<commands index="1"> <commands index="1">
<command><![CDATA[mkdir -p /var/lib/extrausers]]></command> <command><![CDATA[mkdir -p /var/lib/extrausers]]></command>
@@ -4687,7 +4703,8 @@ aliases: files
<!-- Logrotate --> <!-- Logrotate -->
<daemon name="logrotate" title="Logrotate"> <daemon name="logrotate" title="Logrotate">
<install><![CDATA[apt-get install logrotate]]></install> <install><![CDATA[apt-get install logrotate]]></install>
<file name="/etc/logrotate.d/froxlor" chown="root:root" chmod="0644"> <file name="/etc/logrotate.d/froxlor" chown="root:root"
chmod="0644">
<content><![CDATA[ <content><![CDATA[
# #
# Froxlor logrotate snipet # Froxlor logrotate snipet
@@ -4727,7 +4744,8 @@ aliases: files
<command><![CDATA[php {{const.\Froxlor\Froxlor::getInstallDir()}}/scripts/froxlor_master_cronjob.php --force]]></command> <command><![CDATA[php {{const.\Froxlor\Froxlor::getInstallDir()}}/scripts/froxlor_master_cronjob.php --force]]></command>
</daemon> </daemon>
<!-- PHP-FPM --> <!-- PHP-FPM -->
<daemon name="php-fpm" title="PHP-FPM (alternative to mod_php)"> <daemon name="php-fpm"
title="PHP-FPM (alternative to mod_php)">
<commands index="1"> <commands index="1">
<visibility mode="equals" value="apache2">{{settings.system.webserver}} <visibility mode="equals" value="apache2">{{settings.system.webserver}}
</visibility> </visibility>

View File

@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<froxlor> <froxlor>
<distribution name="Ubuntu" codename="Precise" version="12.04" defaulteditor="/usr/bin/nano" deprecated="true"> <distribution name="Ubuntu" codename="Precise"
version="12.04" defaulteditor="/usr/bin/nano" deprecated="true">
<services> <services>
<!-- HTTP --> <!-- HTTP -->
<service type="http" title="{{lng.admin.configfiles.http}}"> <service type="http" title="{{lng.admin.configfiles.http}}">
@@ -370,8 +371,8 @@ include-dir=/etc/powerdns/froxlor/
</content> </content>
</file> </file>
<command><![CDATA[mkdir -p /etc/powerdns/froxlor/]]></command> <command><![CDATA[mkdir -p /etc/powerdns/froxlor/]]></command>
<file name="/etc/powerdns/froxlor/pdns_froxlor.conf" chown="root:root" <file name="/etc/powerdns/froxlor/pdns_froxlor.conf"
chmod="600"> chown="root:root" chmod="600">
<content><![CDATA[ <content><![CDATA[
# mysql-settings / you need to create the power-dns database for yourself! # mysql-settings / you need to create the power-dns database for yourself!
launch=gmysql launch=gmysql
@@ -386,7 +387,8 @@ gmysql-password=
</file> </file>
<command><![CDATA[/etc/init.d/pdns restart]]></command> <command><![CDATA[/etc/init.d/pdns restart]]></command>
</daemon> </daemon>
<daemon name="powerdns_bind" title="PowerDNS via bind-backend"> <daemon name="powerdns_bind"
title="PowerDNS via bind-backend">
<install><![CDATA[apt-get install pdns-server]]></install> <install><![CDATA[apt-get install pdns-server]]></install>
<file name="/etc/powerdns/pdns.conf" backup="true" chmod="600"> <file name="/etc/powerdns/pdns.conf" backup="true" chmod="600">
<content><![CDATA[ <content><![CDATA[
@@ -410,8 +412,8 @@ include-dir=/etc/powerdns/froxlor/
</content> </content>
</file> </file>
<command><![CDATA[mkdir -p /etc/powerdns/froxlor/]]></command> <command><![CDATA[mkdir -p /etc/powerdns/froxlor/]]></command>
<file name="/etc/powerdns/froxlor/pdns_froxlor.conf" chown="root:root" <file name="/etc/powerdns/froxlor/pdns_froxlor.conf"
chmod="600"> chown="root:root" chmod="600">
<content><![CDATA[ <content><![CDATA[
allow-axfr-ips=127.0.0.0/8,::1,<NAMESERVERS_IP> allow-axfr-ips=127.0.0.0/8,::1,<NAMESERVERS_IP>
# add these entries to the list if any speficied: <AXFRSERVERS> # add these entries to the list if any speficied: <AXFRSERVERS>
@@ -453,8 +455,8 @@ local-address=<SERVERIP>,127.0.0.1
<command><![CDATA[chmod 0750 {{settings.system.vmail_homedir}}]]></command> <command><![CDATA[chmod 0750 {{settings.system.vmail_homedir}}]]></command>
</commands> </commands>
<files index="0"> <files index="0">
<file name="/etc/postfix/mysql-virtual_alias_maps.cf" chown="root:postfix" <file name="/etc/postfix/mysql-virtual_alias_maps.cf"
chmod="0640"> chown="root:postfix" chmod="0640">
<content><![CDATA[ <content><![CDATA[
user = <SQL_UNPRIVILEGED_USER> user = <SQL_UNPRIVILEGED_USER>
password = <SQL_UNPRIVILEGED_PASSWORD> password = <SQL_UNPRIVILEGED_PASSWORD>
@@ -498,8 +500,8 @@ query = SELECT DISTINCT username FROM mail_users WHERE email in ((SELECT mail_vi
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/postfix/mysql-virtual_uid_maps.cf" chown="root:postfix" <file name="/etc/postfix/mysql-virtual_uid_maps.cf"
chmod="0640"> chown="root:postfix" chmod="0640">
<content><![CDATA[ <content><![CDATA[
user = <SQL_UNPRIVILEGED_USER> user = <SQL_UNPRIVILEGED_USER>
password = <SQL_UNPRIVILEGED_PASSWORD> password = <SQL_UNPRIVILEGED_PASSWORD>
@@ -510,8 +512,8 @@ query = SELECT uid FROM mail_users WHERE email = '%s'
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/postfix/mysql-virtual_gid_maps.cf" chown="root:postfix" <file name="/etc/postfix/mysql-virtual_gid_maps.cf"
chmod="0640"> chown="root:postfix" chmod="0640">
<content><![CDATA[ <content><![CDATA[
user = <SQL_UNPRIVILEGED_USER> user = <SQL_UNPRIVILEGED_USER>
password = <SQL_UNPRIVILEGED_PASSWORD> password = <SQL_UNPRIVILEGED_PASSWORD>
@@ -558,8 +560,8 @@ root: root@<SERVERNAME>
</include> </include>
<include>//service[@type='smtp']/general/commands[@index=2] <include>//service[@type='smtp']/general/commands[@index=2]
</include> </include>
<file name="/etc/postfix/main.cf" chown="root:root" chmod="0644" <file name="/etc/postfix/main.cf" chown="root:root"
backup="true"> chmod="0644" backup="true">
<content><![CDATA[ <content><![CDATA[
## General Postfix configuration ## General Postfix configuration
# FQDN from Froxlor # FQDN from Froxlor
@@ -654,8 +656,8 @@ debugger_command =
</content> </content>
</file> </file>
<include>//service[@type='smtp']/general/files[@index=0]</include> <include>//service[@type='smtp']/general/files[@index=0]</include>
<file name="/etc/postfix/master.cf" chown="root:root" chmod="0644" <file name="/etc/postfix/master.cf" chown="root:root"
backup="true" mode="append"> chmod="0644" backup="true" mode="append">
<content><![CDATA[ <content><![CDATA[
# Add these lines to be able to use dovecot as delivery agent # Add these lines to be able to use dovecot as delivery agent
# Dovecot LDA # Dovecot LDA
@@ -676,8 +678,8 @@ dovecot unix - n n - - pipe
<install><![CDATA[apt-get install libsasl2-2 libsasl2-modules libsasl2-modules-sql]]></install> <install><![CDATA[apt-get install libsasl2-2 libsasl2-modules libsasl2-modules-sql]]></install>
<include>//service[@type='smtp']/general/commands[@index=2] <include>//service[@type='smtp']/general/commands[@index=2]
</include> </include>
<file name="/etc/postfix/main.cf" chown="root:root" chmod="0644" <file name="/etc/postfix/main.cf" chown="root:root"
backup="true"> chmod="0644" backup="true">
<content><![CDATA[ <content><![CDATA[
## General Postfix configuration ## General Postfix configuration
# should be the default domain from your provider eg. "server100.provider.tld" # should be the default domain from your provider eg. "server100.provider.tld"
@@ -791,7 +793,8 @@ sql_select: SELECT password FROM mail_users WHERE username='%u@%r' OR email='%u@
<!-- IMAP/POP3 services --> <!-- IMAP/POP3 services -->
<service type="mail" title="{{lng.admin.configfiles.mail}}"> <service type="mail" title="{{lng.admin.configfiles.mail}}">
<!-- Dovecot --> <!-- Dovecot -->
<daemon name="dovecot" version="2" title="Dovecot" default="true"> <daemon name="dovecot" version="2" title="Dovecot"
default="true">
<install><![CDATA[apt-get install dovecot-imapd dovecot-pop3d dovecot-postfix dovecot-mysql dovecot-managesieved dovecot-sieve mail-stack-delivery]]></install> <install><![CDATA[apt-get install dovecot-imapd dovecot-pop3d dovecot-postfix dovecot-mysql dovecot-managesieved dovecot-sieve mail-stack-delivery]]></install>
<file name="/etc/dovecot/conf.d/01-mail-stack-delivery.conf" <file name="/etc/dovecot/conf.d/01-mail-stack-delivery.conf"
chown="root:root" chmod="0644" backup="true"> chown="root:root" chmod="0644" backup="true">
@@ -882,8 +885,8 @@ service auth {
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/dovecot/conf.d/10-auth.conf" chown="root:root" <file name="/etc/dovecot/conf.d/10-auth.conf"
chmod="0640" backup="true"> chown="root:root" chmod="0640" backup="true">
<content><![CDATA[ <content><![CDATA[
## ##
## Authentication processes ## Authentication processes
@@ -1015,7 +1018,8 @@ auth_mechanisms = plain login
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/dovecot/conf.d/auth-sql.conf.ext" chown="root:0" chmod="0644" backup="true"> <file name="/etc/dovecot/conf.d/auth-sql.conf.ext"
chown="root:0" chmod="0644" backup="true">
<content><![CDATA[ <content><![CDATA[
passdb { passdb {
driver = sql driver = sql
@@ -1045,8 +1049,8 @@ iterate_query = SELECT username AS user FROM mail_users WHERE (imap = 1 OR pop3
<!-- Courier --> <!-- Courier -->
<daemon name="courier" title="Courier"> <daemon name="courier" title="Courier">
<install><![CDATA[apt-get install courier-pop courier-imap courier-authlib-mysql]]></install> <install><![CDATA[apt-get install courier-pop courier-imap courier-authlib-mysql]]></install>
<file name="/etc/courier/authdaemonrc" chown="root:0" chmod="0600" <file name="/etc/courier/authdaemonrc" chown="root:0"
backup="true"> chmod="0600" backup="true">
<content><![CDATA[ <content><![CDATA[
##VERSION: $Id: authdaemonrc.in,v 1.8 2001/10/07 02:16:22 mrsam Exp $ ##VERSION: $Id: authdaemonrc.in,v 1.8 2001/10/07 02:16:22 mrsam Exp $
# #
@@ -1119,8 +1123,8 @@ authdaemonvar=/var/run/courier/authdaemon
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/courier/authmysqlrc" chown="root:0" chmod="0600" <file name="/etc/courier/authmysqlrc" chown="root:0"
backup="true"> chmod="0600" backup="true">
<content><![CDATA[ <content><![CDATA[
MYSQL_SERVER <SQL_HOST> MYSQL_SERVER <SQL_HOST>
MYSQL_USERNAME <SQL_UNPRIVILEGED_USER> MYSQL_USERNAME <SQL_UNPRIVILEGED_USER>
@@ -1148,7 +1152,8 @@ MYSQL_AUXOPTIONS_FIELD CONCAT("allowimap=",imap,",allowpop3=",pop3)
<!-- Proftpd --> <!-- Proftpd -->
<daemon name="proftpd" title="ProFTPd" default="true"> <daemon name="proftpd" title="ProFTPd" default="true">
<install><![CDATA[apt-get install proftpd-basic proftpd-mod-mysql]]></install> <install><![CDATA[apt-get install proftpd-basic proftpd-mod-mysql]]></install>
<file name="/etc/proftpd/create-cert.sh" chown="root:0" chmod="0700"> <file name="/etc/proftpd/create-cert.sh" chown="root:0"
chmod="0700">
<content><![CDATA[#!/bin/bash <content><![CDATA[#!/bin/bash
[ -f /etc/ssl/certs/proftpd.crt ] || openssl req -new -x509 -newkey rsa:4096 -days 3650 -nodes -out /etc/ssl/certs/proftpd.crt -keyout /etc/ssl/private/proftpd.key -subj "/C=US/ST=Some-State/O=Internet Widgits Pty Ltd/CN=<SERVERNAME>" [ -f /etc/ssl/certs/proftpd.crt ] || openssl req -new -x509 -newkey rsa:4096 -days 3650 -nodes -out /etc/ssl/certs/proftpd.crt -keyout /etc/ssl/private/proftpd.key -subj "/C=US/ST=Some-State/O=Internet Widgits Pty Ltd/CN=<SERVERNAME>"
[ -f /etc/ssl/certs/proftpd_ec.crt ] || openssl req -new -x509 -nodes -newkey ec:<(openssl ecparam -name secp521r1) -keyout /etc/ssl/private/proftpd_ec.key -out /etc/ssl/certs/proftpd_ec.crt -days 3650 -subj "/C=US/ST=Some-State/O=Internet Widgits Pty Ltd/CN=<SERVERNAME>" [ -f /etc/ssl/certs/proftpd_ec.crt ] || openssl req -new -x509 -nodes -newkey ec:<(openssl ecparam -name secp521r1) -keyout /etc/ssl/private/proftpd_ec.key -out /etc/ssl/certs/proftpd_ec.crt -days 3650 -subj "/C=US/ST=Some-State/O=Internet Widgits Pty Ltd/CN=<SERVERNAME>"
@@ -1160,8 +1165,8 @@ chmod 0600 /etc/ssl/private/proftpd.key /etc/ssl/private/proftpd_ec.key
<command><![CDATA[/etc/proftpd/create-cert.sh]]></command> <command><![CDATA[/etc/proftpd/create-cert.sh]]></command>
<command><![CDATA[rm -f /etc/proftpd/create-cert.sh]]></command> <command><![CDATA[rm -f /etc/proftpd/create-cert.sh]]></command>
</commands> </commands>
<file name="/etc/proftpd/proftpd.conf" chown="root:0" chmod="0600" <file name="/etc/proftpd/proftpd.conf" chown="root:0"
backup="true"> chmod="0600" backup="true">
<content><![CDATA[ <content><![CDATA[
# #
# /etc/proftpd/proftpd.conf -- This is a basic ProFTPD configuration file. # /etc/proftpd/proftpd.conf -- This is a basic ProFTPD configuration file.
@@ -1296,8 +1301,8 @@ Include /etc/proftpd/tls.conf
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/proftpd/modules.conf" chown="root:0" chmod="0644" <file name="/etc/proftpd/modules.conf" chown="root:0"
backup="true"> chmod="0644" backup="true">
<content><![CDATA[ <content><![CDATA[
# #
# This file is used to manage DSO modules and features. # This file is used to manage DSO modules and features.
@@ -1403,7 +1408,8 @@ SQLNamedQuery insert-quota-tally INSERT "%{0}, %{1}, %{2}, %{3}, %{4},%{5}, %{6}
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/proftpd/tls.conf" chown="root:root" chmod="0644" backup="true"> <file name="/etc/proftpd/tls.conf" chown="root:root"
chmod="0644" backup="true">
<content><![CDATA[ <content><![CDATA[
<IfModule mod_tls.c> <IfModule mod_tls.c>
TLSEngine on TLSEngine on
@@ -1435,14 +1441,15 @@ TLSVerifyClient off
<!-- Pureftpd --> <!-- Pureftpd -->
<daemon name="pureftpd" title="PureFTPd"> <daemon name="pureftpd" title="PureFTPd">
<install><![CDATA[apt-get install pure-ftpd-common pure-ftpd-mysql]]></install> <install><![CDATA[apt-get install pure-ftpd-common pure-ftpd-mysql]]></install>
<file name="/etc/pure-ftpd/conf/MinUID" chown="root:0" chmod="0644"> <file name="/etc/pure-ftpd/conf/MinUID" chown="root:0"
chmod="0644">
<content><![CDATA[ <content><![CDATA[
1000 1000
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/pure-ftpd/conf/MySQLConfigFile" chown="root:0" <file name="/etc/pure-ftpd/conf/MySQLConfigFile"
chmod="0644"> chown="root:0" chmod="0644">
<content><![CDATA[ <content><![CDATA[
/etc/pure-ftpd/db/mysql.conf /etc/pure-ftpd/db/mysql.conf
]]> ]]>
@@ -1469,8 +1476,8 @@ yes
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/pure-ftpd/conf/PAMAuthentication" chown="root:0" <file name="/etc/pure-ftpd/conf/PAMAuthentication"
chmod="0644"> chown="root:0" chmod="0644">
<content><![CDATA[ <content><![CDATA[
no no
]]> ]]>
@@ -1500,7 +1507,8 @@ MySQLGetQTASZ SELECT panel_customers.diskspace/1024 AS QuotaSize FROM panel_cus
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/pure-ftpd/conf/Bind" chown="root:0" chmod="0644"> <file name="/etc/pure-ftpd/conf/Bind" chown="root:0"
chmod="0644">
<content><![CDATA[ <content><![CDATA[
21 21
]]> ]]>
@@ -1523,7 +1531,8 @@ UPLOADGID=
<!-- System tools/services --> <!-- System tools/services -->
<service type="system" title="{{lng.admin.configfiles.etc}}"> <service type="system" title="{{lng.admin.configfiles.etc}}">
<!-- Cronjob --> <!-- Cronjob -->
<daemon name="cron" title="Cronjob for froxlor" mandatory="true"> <daemon name="cron" title="Cronjob for froxlor"
mandatory="true">
<file name="/etc/cron.d/froxlor" chown="root:0" chmod="0640"> <file name="/etc/cron.d/froxlor" chown="root:0" chmod="0640">
<content><![CDATA[ <content><![CDATA[
# #
@@ -1542,7 +1551,8 @@ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
<command><![CDATA[{{settings.system.crondreload}}]]></command> <command><![CDATA[{{settings.system.crondreload}}]]></command>
</daemon> </daemon>
<!-- AWstats --> <!-- AWstats -->
<daemon name="awstats" title="Awstats (webalizer alternative)"> <daemon name="awstats"
title="Awstats (webalizer alternative)">
<install><![CDATA[apt-get install awstats]]></install> <install><![CDATA[apt-get install awstats]]></install>
<command><![CDATA[cp /usr/share/awstats/tools/awstats_buildstaticpages.pl {{settings.system.awstats_path}}]]></command> <command><![CDATA[cp /usr/share/awstats/tools/awstats_buildstaticpages.pl {{settings.system.awstats_path}}]]></command>
<command><![CDATA[mv {{settings.system.awstats_conf}}/awstats.conf {{settings.system.awstats_conf}}/awstats.model.conf]]></command> <command><![CDATA[mv {{settings.system.awstats_conf}}/awstats.conf {{settings.system.awstats_conf}}/awstats.model.conf]]></command>
@@ -1551,10 +1561,11 @@ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
<command><![CDATA[rm /etc/cron.d/awstats]]></command> <command><![CDATA[rm /etc/cron.d/awstats]]></command>
</daemon> </daemon>
<!-- libnss-mysql --> <!-- libnss-mysql -->
<daemon name="libnss" title="libnss-mysql (required for FCGID/php-fpm/mpm-itk)"> <daemon name="libnss"
title="libnss-mysql (required for FCGID/php-fpm/mpm-itk)">
<install><![CDATA[apt-get install libnss-mysql-bg nscd]]></install> <install><![CDATA[apt-get install libnss-mysql-bg nscd]]></install>
<file name="/etc/libnss-mysql.cfg" chown="root:root" chmod="0600" <file name="/etc/libnss-mysql.cfg" chown="root:root"
backup="true"> chmod="0600" backup="true">
<content><![CDATA[ <content><![CDATA[
getpwnam SELECT username,'x',uid,gid,'Froxlor Customer',homedir,shell \ getpwnam SELECT username,'x',uid,gid,'Froxlor Customer',homedir,shell \
FROM ftp_users \ FROM ftp_users \
@@ -1646,7 +1657,8 @@ aliases: files
<command><![CDATA[nscd --invalidate=group]]></command> <command><![CDATA[nscd --invalidate=group]]></command>
</daemon> </daemon>
<!-- libnss-extrausers --> <!-- libnss-extrausers -->
<daemon name="libnssextrausers" title="libnss-extrausers (alternative to libnss-mysql, required for FCGID/php-fpm/mpm-itk)"> <daemon name="libnssextrausers"
title="libnss-extrausers (alternative to libnss-mysql, required for FCGID/php-fpm/mpm-itk)">
<install><![CDATA[apt-get install nscd libnss-extrausers]]></install> <install><![CDATA[apt-get install nscd libnss-extrausers]]></install>
<commands index="1"> <commands index="1">
<command><![CDATA[mkdir -p /var/lib/extrausers]]></command> <command><![CDATA[mkdir -p /var/lib/extrausers]]></command>
@@ -1686,7 +1698,8 @@ aliases: files
<!-- Logrotate --> <!-- Logrotate -->
<daemon name="logrotate" title="Logrotate"> <daemon name="logrotate" title="Logrotate">
<install><![CDATA[apt-get install logrotate]]></install> <install><![CDATA[apt-get install logrotate]]></install>
<file name="/etc/logrotate.d/froxlor" chown="root:root" chmod="0644"> <file name="/etc/logrotate.d/froxlor" chown="root:root"
chmod="0644">
<content><![CDATA[ <content><![CDATA[
# #
# Froxlor logrotate snipet # Froxlor logrotate snipet
@@ -1726,7 +1739,8 @@ aliases: files
<command><![CDATA[php {{const.\Froxlor\Froxlor::getInstallDir()}}/scripts/froxlor_master_cronjob.php --force]]></command> <command><![CDATA[php {{const.\Froxlor\Froxlor::getInstallDir()}}/scripts/froxlor_master_cronjob.php --force]]></command>
</daemon> </daemon>
<!-- PHP-FPM --> <!-- PHP-FPM -->
<daemon name="php-fpm" title="PHP-FPM (alternative to mod_php)"> <daemon name="php-fpm"
title="PHP-FPM (alternative to mod_php)">
<commands index="1"> <commands index="1">
<visibility mode="equals" value="apache2">{{settings.system.webserver}} <visibility mode="equals" value="apache2">{{settings.system.webserver}}
</visibility> </visibility>

View File

@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<froxlor> <froxlor>
<distribution name="RHEL / CentOS" version="7" defaulteditor="/usr/bin/nano"> <distribution name="RHEL / CentOS" version="7"
defaulteditor="/usr/bin/nano">
<services> <services>
<!-- HTTP --> <!-- HTTP -->
<service type="http" title="{{lng.admin.configfiles.http}}"> <service type="http" title="{{lng.admin.configfiles.http}}">
@@ -87,8 +88,8 @@ Alias "/.well-known/acme-challenge" "{{settings.system.letsencryptchallengepath}
<command><![CDATA[chmod 0750 {{settings.system.vmail_homedir}}]]></command> <command><![CDATA[chmod 0750 {{settings.system.vmail_homedir}}]]></command>
</commands> </commands>
<files index="0"> <files index="0">
<file name="/etc/postfix/mysql-virtual_alias_maps.cf" chown="root:postfix" <file name="/etc/postfix/mysql-virtual_alias_maps.cf"
chmod="0640"> chown="root:postfix" chmod="0640">
<content><![CDATA[ <content><![CDATA[
user = <SQL_UNPRIVILEGED_USER> user = <SQL_UNPRIVILEGED_USER>
password = <SQL_UNPRIVILEGED_PASSWORD> password = <SQL_UNPRIVILEGED_PASSWORD>
@@ -132,8 +133,8 @@ query = SELECT DISTINCT username FROM mail_users WHERE email in ((SELECT mail_vi
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/postfix/mysql-virtual_uid_maps.cf" chown="root:postfix" <file name="/etc/postfix/mysql-virtual_uid_maps.cf"
chmod="0640"> chown="root:postfix" chmod="0640">
<content><![CDATA[ <content><![CDATA[
user = <SQL_UNPRIVILEGED_USER> user = <SQL_UNPRIVILEGED_USER>
password = <SQL_UNPRIVILEGED_PASSWORD> password = <SQL_UNPRIVILEGED_PASSWORD>
@@ -144,8 +145,8 @@ query = SELECT uid FROM mail_users WHERE email = '%s'
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/postfix/mysql-virtual_gid_maps.cf" chown="root:postfix" <file name="/etc/postfix/mysql-virtual_gid_maps.cf"
chmod="0640"> chown="root:postfix" chmod="0640">
<content><![CDATA[ <content><![CDATA[
user = <SQL_UNPRIVILEGED_USER> user = <SQL_UNPRIVILEGED_USER>
password = <SQL_UNPRIVILEGED_PASSWORD> password = <SQL_UNPRIVILEGED_PASSWORD>
@@ -164,16 +165,16 @@ query = SELECT gid FROM mail_users WHERE email = '%s'
</commands> </commands>
</general> </general>
<!-- postfix with dovecot --> <!-- postfix with dovecot -->
<daemon name="postfix_dovecot" version="2.10" title="Postfix with dovecot" <daemon name="postfix_dovecot" version="2.10"
default="true"> title="Postfix with dovecot" default="true">
<include>//service[@type='smtp']/general/commands[@index=1] <include>//service[@type='smtp']/general/commands[@index=1]
</include> </include>
<include>//service[@type='smtp']/general/installs[@index=1] <include>//service[@type='smtp']/general/installs[@index=1]
</include> </include>
<include>//service[@type='smtp']/general/commands[@index=2] <include>//service[@type='smtp']/general/commands[@index=2]
</include> </include>
<file name="/etc/postfix/main.cf" chown="root:root" chmod="0644" <file name="/etc/postfix/main.cf" chown="root:root"
backup="true"> chmod="0644" backup="true">
<content><![CDATA[ <content><![CDATA[
## General Postfix configuration ## General Postfix configuration
# FQDN from Froxlor # FQDN from Froxlor
@@ -262,8 +263,8 @@ debugger_command =
</content> </content>
</file> </file>
<include>//service[@type='smtp']/general/files[@index=0]</include> <include>//service[@type='smtp']/general/files[@index=0]</include>
<file name="/etc/postfix/master.cf" chown="root:root" chmod="0644" <file name="/etc/postfix/master.cf" chown="root:root"
backup="true" mode="append"> chmod="0644" backup="true" mode="append">
<content><![CDATA[ <content><![CDATA[
# added for Froxlor # added for Froxlor
dovecot unix - n n - - pipe flags=DRhu user=vmail:vmail argv=/usr/libexec/dovecot/deliver -f ${sender} -d ${recipient} dovecot unix - n n - - pipe flags=DRhu user=vmail:vmail argv=/usr/libexec/dovecot/deliver -f ${sender} -d ${recipient}
@@ -277,7 +278,8 @@ dovecot unix - n n - - pipe flags=DRhu user=vmail:vmail argv=/usr/libexec/dove
<!-- IMAP/POP3 services --> <!-- IMAP/POP3 services -->
<service type="mail" title="{{lng.admin.configfiles.mail}}"> <service type="mail" title="{{lng.admin.configfiles.mail}}">
<!-- Dovecot --> <!-- Dovecot -->
<daemon name="dovecot" version="2.2" title="Dovecot" default="true"> <daemon name="dovecot" version="2.2" title="Dovecot"
default="true">
<install><![CDATA[yum install dovecot dovecot-mysql dovecot-pigeonhole]]></install> <install><![CDATA[yum install dovecot dovecot-mysql dovecot-pigeonhole]]></install>
<file name="/etc/dovecot/dovecot.conf" chown="root:root" <file name="/etc/dovecot/dovecot.conf" chown="root:root"
chmod="0644" backup="true"> chmod="0644" backup="true">
@@ -504,8 +506,8 @@ auth_mechanisms = plain
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/dovecot/conf.d/10-logging.conf" chown="root:0" <file name="/etc/dovecot/conf.d/10-logging.conf"
chmod="0644" backup="true"> chown="root:0" chmod="0644" backup="true">
<content><![CDATA[ <content><![CDATA[
## ##
## Log destination. ## Log destination.
@@ -1215,8 +1217,8 @@ protocol lda {
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/dovecot/conf.d/15-mailboxes.conf" chown="root:0" <file name="/etc/dovecot/conf.d/15-mailboxes.conf"
chmod="0644" backup="true"> chown="root:0" chmod="0644" backup="true">
<content><![CDATA[ <content><![CDATA[
## ##
## Mailbox definitions ## Mailbox definitions
@@ -1364,8 +1366,8 @@ protocol lmtp {
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/dovecot/conf.d/20-managesieve.conf" chown="root:0" <file name="/etc/dovecot/conf.d/20-managesieve.conf"
chmod="0644" backup="true"> chown="root:0" chmod="0644" backup="true">
<content><![CDATA[ <content><![CDATA[
## ##
## ManageSieve specific settings ## ManageSieve specific settings
@@ -1821,10 +1823,11 @@ iterate_query = SELECT username AS user FROM mail_users
<!-- FTP services --> <!-- FTP services -->
<service type="ftp" title="{{lng.admin.configfiles.ftp}}"> <service type="ftp" title="{{lng.admin.configfiles.ftp}}">
<!-- Proftpd --> <!-- Proftpd -->
<daemon name="proftpd" version="1.3" title="ProFTPd" default="true"> <daemon name="proftpd" version="1.3" title="ProFTPd"
default="true">
<install><![CDATA[yum install proftpd proftpd-mysql]]></install> <install><![CDATA[yum install proftpd proftpd-mysql]]></install>
<file name="/etc/proftpd/proftpd.conf" chown="root:0" chmod="0600" <file name="/etc/proftpd/proftpd.conf" chown="root:0"
backup="true"> chmod="0600" backup="true">
<content><![CDATA[ <content><![CDATA[
# This is the ProFTPD configuration file # This is the ProFTPD configuration file
# #
@@ -2284,7 +2287,8 @@ ControlsLog /var/log/proftpd/controls.log
<!-- System tools/services --> <!-- System tools/services -->
<service type="system" title="{{lng.admin.configfiles.etc}}"> <service type="system" title="{{lng.admin.configfiles.etc}}">
<!-- Cronjob --> <!-- Cronjob -->
<daemon name="cron" title="Cronjob for froxlor" mandatory="true"> <daemon name="cron" title="Cronjob for froxlor"
mandatory="true">
<file name="/etc/cron.d/froxlor" chown="root:0" chmod="0640"> <file name="/etc/cron.d/froxlor" chown="root:0" chmod="0640">
<content><![CDATA[ <content><![CDATA[
# #
@@ -2303,17 +2307,19 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin
<command><![CDATA[{{settings.system.crondreload}}]]></command> <command><![CDATA[{{settings.system.crondreload}}]]></command>
</daemon> </daemon>
<!-- AWstats --> <!-- AWstats -->
<daemon name="awstats" title="Awstats (webalizer alternative)"> <daemon name="awstats"
title="Awstats (webalizer alternative)">
<command><![CDATA[sed -i.bak 's/^DirData/# DirData/' {{settings.system.awstats_conf}}/awstats.model.conf]]></command> <command><![CDATA[sed -i.bak 's/^DirData/# DirData/' {{settings.system.awstats_conf}}/awstats.model.conf]]></command>
<command><![CDATA[sed -i.bak 's|^\\(DirIcons=\\).*$|\\1\\"/awstats-icon\\"|' {{settings.system.awstats_conf}}/awstats.model.conf]]></command> <command><![CDATA[sed -i.bak 's|^\\(DirIcons=\\).*$|\\1\\"/awstats-icon\\"|' {{settings.system.awstats_conf}}/awstats.model.conf]]></command>
<command><![CDATA[rm /etc/cron.d/awstats]]></command> <command><![CDATA[rm /etc/cron.d/awstats]]></command>
</daemon> </daemon>
<!-- libnss-mysql --> <!-- libnss-mysql -->
<daemon name="libnss" title="libnss-mysql (required for FCGID/php-fpm/mpm-itk)"> <daemon name="libnss"
title="libnss-mysql (required for FCGID/php-fpm/mpm-itk)">
<install><![CDATA[yum --enablerepo=extras install epel-release]]></install> <install><![CDATA[yum --enablerepo=extras install epel-release]]></install>
<install><![CDATA[yum install libnss-mysql nscd]]></install> <install><![CDATA[yum install libnss-mysql nscd]]></install>
<file name="/etc/libnss-mysql.cfg" chown="root:root" chmod="0600" <file name="/etc/libnss-mysql.cfg" chown="root:root"
backup="true"> chmod="0600" backup="true">
<content><![CDATA[ <content><![CDATA[
getpwnam SELECT username,'x',uid,gid,'Froxlor Customer',homedir,shell \ getpwnam SELECT username,'x',uid,gid,'Froxlor Customer',homedir,shell \
FROM ftp_users \ FROM ftp_users \
@@ -2413,7 +2419,8 @@ aliases: files nisplus
<!-- Logrotate --> <!-- Logrotate -->
<daemon name="logrotate" title="Logrotate"> <daemon name="logrotate" title="Logrotate">
<install><![CDATA[yum install logrotate]]></install> <install><![CDATA[yum install logrotate]]></install>
<file name="/etc/logrotate.d/froxlor" chown="root:root" chmod="0644"> <file name="/etc/logrotate.d/froxlor" chown="root:root"
chmod="0644">
<content><![CDATA[ <content><![CDATA[
# #
# Froxlor logrotate snipet # Froxlor logrotate snipet

View File

@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<froxlor> <froxlor>
<distribution name="Debian" codename="Stretch" version="9.x" defaulteditor="/bin/nano"> <distribution name="Debian" codename="Stretch"
version="9.x" defaulteditor="/bin/nano">
<services> <services>
<!-- HTTP --> <!-- HTTP -->
<service type="http" title="{{lng.admin.configfiles.http}}"> <service type="http" title="{{lng.admin.configfiles.http}}">
@@ -43,7 +44,8 @@
</commands> </commands>
</general> </general>
<!-- HTTP Apache --> <!-- HTTP Apache -->
<daemon name="apache" version="2.4" title="Apache 2.4" default="true"> <daemon name="apache" version="2.4" title="Apache 2.4"
default="true">
<install><![CDATA[apt-get install apache2]]></install> <install><![CDATA[apt-get install apache2]]></install>
<include>//service[@type='http']/general/commands</include> <include>//service[@type='http']/general/commands</include>
<command><![CDATA[a2dismod userdir]]></command> <command><![CDATA[a2dismod userdir]]></command>
@@ -893,8 +895,8 @@ include-dir=/etc/powerdns/froxlor/
</content> </content>
</file> </file>
<command><![CDATA[mkdir -p /etc/powerdns/froxlor/]]></command> <command><![CDATA[mkdir -p /etc/powerdns/froxlor/]]></command>
<file name="/etc/powerdns/froxlor/pdns_froxlor.conf" chown="root:root" <file name="/etc/powerdns/froxlor/pdns_froxlor.conf"
chmod="600"> chown="root:root" chmod="600">
<content><![CDATA[ <content><![CDATA[
# mysql-settings / you need to create the power-dns database for yourself! # mysql-settings / you need to create the power-dns database for yourself!
launch=gmysql launch=gmysql
@@ -909,7 +911,8 @@ gmysql-password=
</file> </file>
<command><![CDATA[/etc/init.d/pdns restart]]></command> <command><![CDATA[/etc/init.d/pdns restart]]></command>
</daemon> </daemon>
<daemon name="powerdns_bind" title="PowerDNS via bind-backend"> <daemon name="powerdns_bind"
title="PowerDNS via bind-backend">
<install><![CDATA[apt-get install pdns-server]]></install> <install><![CDATA[apt-get install pdns-server]]></install>
<file name="/etc/powerdns/pdns.conf" backup="true" chmod="600"> <file name="/etc/powerdns/pdns.conf" backup="true" chmod="600">
<content><![CDATA[ <content><![CDATA[
@@ -1436,8 +1439,8 @@ include-dir=/etc/powerdns/froxlor/
</content> </content>
</file> </file>
<command><![CDATA[mkdir -p /etc/powerdns/froxlor/]]></command> <command><![CDATA[mkdir -p /etc/powerdns/froxlor/]]></command>
<file name="/etc/powerdns/froxlor/pdns_froxlor.conf" chown="root:root" <file name="/etc/powerdns/froxlor/pdns_froxlor.conf"
chmod="600"> chown="root:root" chmod="600">
<content><![CDATA[ <content><![CDATA[
# Bind backend configuration # Bind backend configuration
@@ -1483,8 +1486,8 @@ bind-check-interval=180
<command><![CDATA[chmod 0750 {{settings.system.vmail_homedir}}]]></command> <command><![CDATA[chmod 0750 {{settings.system.vmail_homedir}}]]></command>
</commands> </commands>
<files index="0"> <files index="0">
<file name="/etc/postfix/mysql-virtual_alias_maps.cf" chown="root:postfix" <file name="/etc/postfix/mysql-virtual_alias_maps.cf"
chmod="0640"> chown="root:postfix" chmod="0640">
<content><![CDATA[ <content><![CDATA[
user = <SQL_UNPRIVILEGED_USER> user = <SQL_UNPRIVILEGED_USER>
password = <SQL_UNPRIVILEGED_PASSWORD> password = <SQL_UNPRIVILEGED_PASSWORD>
@@ -1528,8 +1531,8 @@ query = SELECT DISTINCT username FROM mail_users WHERE email in ((SELECT mail_vi
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/postfix/mysql-virtual_uid_maps.cf" chown="root:postfix" <file name="/etc/postfix/mysql-virtual_uid_maps.cf"
chmod="0640"> chown="root:postfix" chmod="0640">
<content><![CDATA[ <content><![CDATA[
user = <SQL_UNPRIVILEGED_USER> user = <SQL_UNPRIVILEGED_USER>
password = <SQL_UNPRIVILEGED_PASSWORD> password = <SQL_UNPRIVILEGED_PASSWORD>
@@ -1540,8 +1543,8 @@ query = SELECT uid FROM mail_users WHERE email = '%s'
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/postfix/mysql-virtual_gid_maps.cf" chown="root:postfix" <file name="/etc/postfix/mysql-virtual_gid_maps.cf"
chmod="0640"> chown="root:postfix" chmod="0640">
<content><![CDATA[ <content><![CDATA[
user = <SQL_UNPRIVILEGED_USER> user = <SQL_UNPRIVILEGED_USER>
password = <SQL_UNPRIVILEGED_PASSWORD> password = <SQL_UNPRIVILEGED_PASSWORD>
@@ -1588,8 +1591,8 @@ root: root@<SERVERNAME>
</include> </include>
<include>//service[@type='smtp']/general/commands[@index=2] <include>//service[@type='smtp']/general/commands[@index=2]
</include> </include>
<file name="/etc/postfix/main.cf" chown="root:root" chmod="0644" <file name="/etc/postfix/main.cf" chown="root:root"
backup="true"> chmod="0644" backup="true">
<content><![CDATA[ <content><![CDATA[
# Global Postfix configuration file. This file lists only a subset # Global Postfix configuration file. This file lists only a subset
# of all parameters. For the syntax, and for a complete parameter # of all parameters. For the syntax, and for a complete parameter
@@ -2334,8 +2337,8 @@ virtual_mailbox_limit = 0
</content> </content>
</file> </file>
<include>//service[@type='smtp']/general/files[@index=0]</include> <include>//service[@type='smtp']/general/files[@index=0]</include>
<file name="/etc/postfix/master.cf" chown="root:root" chmod="0644" <file name="/etc/postfix/master.cf" chown="root:root"
backup="true"> chmod="0644" backup="true">
<content><![CDATA[ <content><![CDATA[
# #
# Postfix master process configuration file. For details on the format # Postfix master process configuration file. For details on the format
@@ -2586,8 +2589,8 @@ dict {
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/dovecot/dovecot-sql.conf.ext" chown="root:root" <file name="/etc/dovecot/dovecot-sql.conf.ext"
chmod="0600" backup="true"> chown="root:root" chmod="0600" backup="true">
<content><![CDATA[ <content><![CDATA[
# This file is commonly accessed via passdb {} or userdb {} section in # This file is commonly accessed via passdb {} or userdb {} section in
# conf.d/auth-sql.conf.ext # conf.d/auth-sql.conf.ext
@@ -3246,8 +3249,8 @@ mail_access_groups = vmail
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/dovecot/conf.d/10-master.conf" chown="root:0" <file name="/etc/dovecot/conf.d/10-master.conf"
chmod="0644" backup="true"> chown="root:0" chmod="0644" backup="true">
<content><![CDATA[ <content><![CDATA[
#default_process_limit = 100 #default_process_limit = 100
#default_client_limit = 1000 #default_client_limit = 1000
@@ -3569,8 +3572,8 @@ protocol imap {
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/dovecot/conf.d/20-managesieve.conf" chown="root:0" <file name="/etc/dovecot/conf.d/20-managesieve.conf"
chmod="0644" backup="true"> chown="root:0" chmod="0644" backup="true">
<content><![CDATA[ <content><![CDATA[
## ##
## ManageSieve specific settings ## ManageSieve specific settings
@@ -3872,8 +3875,8 @@ plugin {
</commands> </commands>
</general> </general>
<!-- Dovecot with postfix --> <!-- Dovecot with postfix -->
<daemon name="dovecot_postfix" version="2" title="Dovecot with postfix" <daemon name="dovecot_postfix" version="2"
default="true"> title="Dovecot with postfix" default="true">
<include>//service[@type='mail']/general/installs[@index=1] <include>//service[@type='mail']/general/installs[@index=1]
</include> </include>
<include>//service[@type='mail']/general/files[@index=1] <include>//service[@type='mail']/general/files[@index=1]
@@ -3887,7 +3890,8 @@ plugin {
<!-- Proftpd --> <!-- Proftpd -->
<daemon name="proftpd" title="ProFTPd" default="true"> <daemon name="proftpd" title="ProFTPd" default="true">
<install><![CDATA[apt-get install proftpd-basic proftpd-mod-mysql]]></install> <install><![CDATA[apt-get install proftpd-basic proftpd-mod-mysql]]></install>
<file name="/etc/proftpd/create-cert.sh" chown="root:0" chmod="0700"> <file name="/etc/proftpd/create-cert.sh" chown="root:0"
chmod="0700">
<content><![CDATA[#!/bin/bash <content><![CDATA[#!/bin/bash
[ -f /etc/ssl/certs/proftpd.crt ] || openssl req -new -x509 -newkey rsa:4096 -days 3650 -nodes -out /etc/ssl/certs/proftpd.crt -keyout /etc/ssl/private/proftpd.key -subj "/C=US/ST=Some-State/O=Internet Widgits Pty Ltd/CN=<SERVERNAME>" [ -f /etc/ssl/certs/proftpd.crt ] || openssl req -new -x509 -newkey rsa:4096 -days 3650 -nodes -out /etc/ssl/certs/proftpd.crt -keyout /etc/ssl/private/proftpd.key -subj "/C=US/ST=Some-State/O=Internet Widgits Pty Ltd/CN=<SERVERNAME>"
[ -f /etc/ssl/certs/proftpd_ec.crt ] || openssl req -new -x509 -nodes -newkey ec:<(openssl ecparam -name secp521r1) -keyout /etc/ssl/private/proftpd_ec.key -out /etc/ssl/certs/proftpd_ec.crt -days 3650 -subj "/C=US/ST=Some-State/O=Internet Widgits Pty Ltd/CN=<SERVERNAME>" [ -f /etc/ssl/certs/proftpd_ec.crt ] || openssl req -new -x509 -nodes -newkey ec:<(openssl ecparam -name secp521r1) -keyout /etc/ssl/private/proftpd_ec.key -out /etc/ssl/certs/proftpd_ec.crt -days 3650 -subj "/C=US/ST=Some-State/O=Internet Widgits Pty Ltd/CN=<SERVERNAME>"
@@ -3899,8 +3903,8 @@ chmod 0600 /etc/ssl/private/proftpd.key /etc/ssl/private/proftpd_ec.key
<command><![CDATA[/etc/proftpd/create-cert.sh]]></command> <command><![CDATA[/etc/proftpd/create-cert.sh]]></command>
<command><![CDATA[rm -f /etc/proftpd/create-cert.sh]]></command> <command><![CDATA[rm -f /etc/proftpd/create-cert.sh]]></command>
</commands> </commands>
<file name="/etc/proftpd/proftpd.conf" chown="root:0" chmod="0600" <file name="/etc/proftpd/proftpd.conf" chown="root:0"
backup="true"> chmod="0600" backup="true">
<content><![CDATA[ <content><![CDATA[
# #
# /etc/proftpd/proftpd.conf -- This is a basic ProFTPD configuration file. # /etc/proftpd/proftpd.conf -- This is a basic ProFTPD configuration file.
@@ -4094,8 +4098,8 @@ Include /etc/proftpd/conf.d/
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/proftpd/modules.conf" chown="root:0" chmod="0644" <file name="/etc/proftpd/modules.conf" chown="root:0"
backup="true"> chmod="0644" backup="true">
<content><![CDATA[ <content><![CDATA[
# #
# This file is used to manage DSO modules and features. # This file is used to manage DSO modules and features.
@@ -4262,7 +4266,8 @@ SQLNamedQuery insert-quota-tally INSERT "%{0}, %{1}, %{2}, %{3}, %{4},%{5}, %{6}
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/proftpd/tls.conf" chown="root:root" chmod="0644" backup="true"> <file name="/etc/proftpd/tls.conf" chown="root:root"
chmod="0644" backup="true">
<content><![CDATA[ <content><![CDATA[
<IfModule mod_tls.c> <IfModule mod_tls.c>
TLSEngine on TLSEngine on
@@ -4294,14 +4299,15 @@ TLSVerifyClient off
<!-- Pureftpd --> <!-- Pureftpd -->
<daemon name="pureftpd" title="PureFTPd"> <daemon name="pureftpd" title="PureFTPd">
<install><![CDATA[apt-get install pure-ftpd-common pure-ftpd-mysql]]></install> <install><![CDATA[apt-get install pure-ftpd-common pure-ftpd-mysql]]></install>
<file name="/etc/pure-ftpd/conf/MinUID" chown="root:0" chmod="0644"> <file name="/etc/pure-ftpd/conf/MinUID" chown="root:0"
chmod="0644">
<content><![CDATA[ <content><![CDATA[
1000 1000
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/pure-ftpd/conf/MySQLConfigFile" chown="root:0" <file name="/etc/pure-ftpd/conf/MySQLConfigFile"
chmod="0644"> chown="root:0" chmod="0644">
<content><![CDATA[ <content><![CDATA[
/etc/pure-ftpd/db/mysql.conf /etc/pure-ftpd/db/mysql.conf
]]> ]]>
@@ -4328,8 +4334,8 @@ yes
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/pure-ftpd/conf/PAMAuthentication" chown="root:0" <file name="/etc/pure-ftpd/conf/PAMAuthentication"
chmod="0644"> chown="root:0" chmod="0644">
<content><![CDATA[ <content><![CDATA[
no no
]]> ]]>
@@ -4475,7 +4481,8 @@ MySQLGetQTASZ SELECT panel_customers.diskspace/1024 AS QuotaSize FROM panel_cus
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/pure-ftpd/conf/Bind" chown="root:0" chmod="0644"> <file name="/etc/pure-ftpd/conf/Bind" chown="root:0"
chmod="0644">
<content><![CDATA[ <content><![CDATA[
21 21
]]> ]]>
@@ -4519,7 +4526,8 @@ UPLOADGID=
<!-- System tools/services --> <!-- System tools/services -->
<service type="system" title="{{lng.admin.configfiles.etc}}"> <service type="system" title="{{lng.admin.configfiles.etc}}">
<!-- Cronjob --> <!-- Cronjob -->
<daemon name="cron" title="Cronjob for froxlor" mandatory="true"> <daemon name="cron" title="Cronjob for froxlor"
mandatory="true">
<file name="/etc/cron.d/froxlor" chown="root:0" chmod="0640"> <file name="/etc/cron.d/froxlor" chown="root:0" chmod="0640">
<content><![CDATA[ <content><![CDATA[
# #
@@ -4538,7 +4546,8 @@ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
<command><![CDATA[{{settings.system.crondreload}}]]></command> <command><![CDATA[{{settings.system.crondreload}}]]></command>
</daemon> </daemon>
<!-- AWstats --> <!-- AWstats -->
<daemon name="awstats" title="Awstats (webalizer alternative)"> <daemon name="awstats"
title="Awstats (webalizer alternative)">
<install><![CDATA[apt-get install awstats]]></install> <install><![CDATA[apt-get install awstats]]></install>
<command><![CDATA[cp /usr/share/awstats/tools/awstats_buildstaticpages.pl {{settings.system.awstats_path}}]]></command> <command><![CDATA[cp /usr/share/awstats/tools/awstats_buildstaticpages.pl {{settings.system.awstats_path}}]]></command>
<command><![CDATA[mv {{settings.system.awstats_conf}}/awstats.conf {{settings.system.awstats_conf}}/awstats.model.conf]]></command> <command><![CDATA[mv {{settings.system.awstats_conf}}/awstats.conf {{settings.system.awstats_conf}}/awstats.model.conf]]></command>
@@ -4547,7 +4556,8 @@ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
<command><![CDATA[rm /etc/cron.d/awstats]]></command> <command><![CDATA[rm /etc/cron.d/awstats]]></command>
</daemon> </daemon>
<!-- libnss-extrausers --> <!-- libnss-extrausers -->
<daemon name="libnssextrausers" title="libnss-extrausers (alternative to libnss-mysql, required for FCGID/php-fpm/mpm-itk)"> <daemon name="libnssextrausers"
title="libnss-extrausers (alternative to libnss-mysql, required for FCGID/php-fpm/mpm-itk)">
<install><![CDATA[apt-get install nscd libnss-extrausers]]></install> <install><![CDATA[apt-get install nscd libnss-extrausers]]></install>
<commands index="1"> <commands index="1">
<command><![CDATA[mkdir -p /var/lib/extrausers]]></command> <command><![CDATA[mkdir -p /var/lib/extrausers]]></command>
@@ -4587,7 +4597,8 @@ aliases: files
<!-- Logrotate --> <!-- Logrotate -->
<daemon name="logrotate" title="Logrotate"> <daemon name="logrotate" title="Logrotate">
<install><![CDATA[apt-get install logrotate]]></install> <install><![CDATA[apt-get install logrotate]]></install>
<file name="/etc/logrotate.d/froxlor" chown="root:root" chmod="0644"> <file name="/etc/logrotate.d/froxlor" chown="root:root"
chmod="0644">
<content><![CDATA[ <content><![CDATA[
# #
# Froxlor logrotate snipet # Froxlor logrotate snipet
@@ -4627,7 +4638,8 @@ aliases: files
<command><![CDATA[php {{const.\Froxlor\Froxlor::getInstallDir()}}/scripts/froxlor_master_cronjob.php --force]]></command> <command><![CDATA[php {{const.\Froxlor\Froxlor::getInstallDir()}}/scripts/froxlor_master_cronjob.php --force]]></command>
</daemon> </daemon>
<!-- PHP-FPM --> <!-- PHP-FPM -->
<daemon name="php-fpm" title="PHP-FPM (alternative to mod_php)"> <daemon name="php-fpm"
title="PHP-FPM (alternative to mod_php)">
<install> <install>
<visibility mode="equals" value="apache2">{{settings.system.webserver}} <visibility mode="equals" value="apache2">{{settings.system.webserver}}
</visibility> </visibility>

View File

@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<froxlor> <froxlor>
<distribution name="Ubuntu" codename="Trusty" version="14.04" defaulteditor="/usr/bin/nano"> <distribution name="Ubuntu" codename="Trusty"
version="14.04" defaulteditor="/usr/bin/nano">
<services> <services>
<!-- HTTP --> <!-- HTTP -->
<service type="http" title="{{lng.admin.configfiles.http}}"> <service type="http" title="{{lng.admin.configfiles.http}}">
@@ -408,8 +409,8 @@ include-dir=/etc/powerdns/froxlor/
</content> </content>
</file> </file>
<command><![CDATA[mkdir -p /etc/powerdns/froxlor/]]></command> <command><![CDATA[mkdir -p /etc/powerdns/froxlor/]]></command>
<file name="/etc/powerdns/froxlor/pdns_froxlor.conf" chown="root:root" <file name="/etc/powerdns/froxlor/pdns_froxlor.conf"
chmod="600"> chown="root:root" chmod="600">
<content><![CDATA[ <content><![CDATA[
# mysql-settings / you need to create the power-dns database for yourself! # mysql-settings / you need to create the power-dns database for yourself!
launch=gmysql launch=gmysql
@@ -424,7 +425,8 @@ gmysql-password=
</file> </file>
<command><![CDATA[service pdns restart]]></command> <command><![CDATA[service pdns restart]]></command>
</daemon> </daemon>
<daemon name="powerdns_bind" title="PowerDNS via bind-backend"> <daemon name="powerdns_bind"
title="PowerDNS via bind-backend">
<install><![CDATA[apt-get install pdns-server]]></install> <install><![CDATA[apt-get install pdns-server]]></install>
<file name="/etc/powerdns/pdns.conf" backup="true"> <file name="/etc/powerdns/pdns.conf" backup="true">
<content><![CDATA[ <content><![CDATA[
@@ -450,8 +452,8 @@ include-dir=/etc/powerdns/froxlor/
</content> </content>
</file> </file>
<command><![CDATA[mkdir -p /etc/powerdns/froxlor/]]></command> <command><![CDATA[mkdir -p /etc/powerdns/froxlor/]]></command>
<file name="/etc/powerdns/froxlor/pdns_froxlor.conf" chown="root:root" <file name="/etc/powerdns/froxlor/pdns_froxlor.conf"
chmod="600"> chown="root:root" chmod="600">
<content><![CDATA[ <content><![CDATA[
allow-axfr-ips=127.0.0.0/8,::1,<NAMESERVERS_IP> allow-axfr-ips=127.0.0.0/8,::1,<NAMESERVERS_IP>
# add these entries to the list if any speficied: <AXFRSERVERS> # add these entries to the list if any speficied: <AXFRSERVERS>
@@ -493,8 +495,8 @@ local-address=<SERVERIP>,127.0.0.1
<command><![CDATA[chmod 0750 {{settings.system.vmail_homedir}}]]></command> <command><![CDATA[chmod 0750 {{settings.system.vmail_homedir}}]]></command>
</commands> </commands>
<files index="0"> <files index="0">
<file name="/etc/postfix/mysql-virtual_alias_maps.cf" chown="root:postfix" <file name="/etc/postfix/mysql-virtual_alias_maps.cf"
chmod="0640"> chown="root:postfix" chmod="0640">
<content><![CDATA[ <content><![CDATA[
user = <SQL_UNPRIVILEGED_USER> user = <SQL_UNPRIVILEGED_USER>
password = <SQL_UNPRIVILEGED_PASSWORD> password = <SQL_UNPRIVILEGED_PASSWORD>
@@ -538,8 +540,8 @@ query = SELECT DISTINCT username FROM mail_users WHERE email in ((SELECT mail_vi
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/postfix/mysql-virtual_uid_maps.cf" chown="root:postfix" <file name="/etc/postfix/mysql-virtual_uid_maps.cf"
chmod="0640"> chown="root:postfix" chmod="0640">
<content><![CDATA[ <content><![CDATA[
user = <SQL_UNPRIVILEGED_USER> user = <SQL_UNPRIVILEGED_USER>
password = <SQL_UNPRIVILEGED_PASSWORD> password = <SQL_UNPRIVILEGED_PASSWORD>
@@ -550,8 +552,8 @@ query = SELECT uid FROM mail_users WHERE email = '%s'
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/postfix/mysql-virtual_gid_maps.cf" chown="root:postfix" <file name="/etc/postfix/mysql-virtual_gid_maps.cf"
chmod="0640"> chown="root:postfix" chmod="0640">
<content><![CDATA[ <content><![CDATA[
user = <SQL_UNPRIVILEGED_USER> user = <SQL_UNPRIVILEGED_USER>
password = <SQL_UNPRIVILEGED_PASSWORD> password = <SQL_UNPRIVILEGED_PASSWORD>
@@ -598,8 +600,8 @@ root: root@<SERVERNAME>
</include> </include>
<include>//service[@type='smtp']/general/commands[@index=2] <include>//service[@type='smtp']/general/commands[@index=2]
</include> </include>
<file name="/etc/postfix/main.cf" chown="root:root" chmod="0644" <file name="/etc/postfix/main.cf" chown="root:root"
backup="true"> chmod="0644" backup="true">
<content><![CDATA[ <content><![CDATA[
## General Postfix configuration ## General Postfix configuration
# FQDN from Froxlor # FQDN from Froxlor
@@ -694,8 +696,8 @@ debugger_command =
</content> </content>
</file> </file>
<include>//service[@type='smtp']/general/files[@index=0]</include> <include>//service[@type='smtp']/general/files[@index=0]</include>
<file name="/etc/postfix/master.cf" chown="root:root" chmod="0644" <file name="/etc/postfix/master.cf" chown="root:root"
backup="true" mode="append"> chmod="0644" backup="true" mode="append">
<content><![CDATA[ <content><![CDATA[
# Add these lines to be able to use dovecot as delivery agent # Add these lines to be able to use dovecot as delivery agent
# Dovecot LDA # Dovecot LDA
@@ -716,8 +718,8 @@ dovecot unix - n n - - pipe
<install><![CDATA[apt-get install libsasl2-2 libsasl2-modules libsasl2-modules-sql]]></install> <install><![CDATA[apt-get install libsasl2-2 libsasl2-modules libsasl2-modules-sql]]></install>
<include>//service[@type='smtp']/general/commands[@index=2] <include>//service[@type='smtp']/general/commands[@index=2]
</include> </include>
<file name="/etc/postfix/main.cf" chown="root:root" chmod="0644" <file name="/etc/postfix/main.cf" chown="root:root"
backup="true"> chmod="0644" backup="true">
<content><![CDATA[ <content><![CDATA[
## General Postfix configuration ## General Postfix configuration
# should be the default domain from your provider eg. "server100.provider.tld" # should be the default domain from your provider eg. "server100.provider.tld"
@@ -831,7 +833,8 @@ sql_select: SELECT password FROM mail_users WHERE username='%u@%r' OR email='%u@
<!-- IMAP/POP3 services --> <!-- IMAP/POP3 services -->
<service type="mail" title="{{lng.admin.configfiles.mail}}"> <service type="mail" title="{{lng.admin.configfiles.mail}}">
<!-- Dovecot --> <!-- Dovecot -->
<daemon name="dovecot" version="2" title="Dovecot" default="true"> <daemon name="dovecot" version="2" title="Dovecot"
default="true">
<install><![CDATA[apt-get install dovecot-imapd dovecot-pop3d dovecot-mysql mail-stack-delivery]]></install> <install><![CDATA[apt-get install dovecot-imapd dovecot-pop3d dovecot-mysql mail-stack-delivery]]></install>
<file name="/etc/dovecot/conf.d/99-mail-stack-delivery.conf" <file name="/etc/dovecot/conf.d/99-mail-stack-delivery.conf"
chown="root:root" chmod="0644" backup="true"> chown="root:root" chmod="0644" backup="true">
@@ -909,8 +912,8 @@ service auth {
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/dovecot/conf.d/10-auth.conf" chown="root:root" <file name="/etc/dovecot/conf.d/10-auth.conf"
chmod="0644" backup="true"> chown="root:root" chmod="0644" backup="true">
<content><![CDATA[ <content><![CDATA[
## ##
## Authentication processes ## Authentication processes
@@ -1059,8 +1062,8 @@ iterate_query = SELECT username AS user FROM mail_users WHERE (imap = 1 OR pop3
<!-- Courier --> <!-- Courier -->
<daemon name="courier" title="Courier"> <daemon name="courier" title="Courier">
<install><![CDATA[apt-get install courier-pop courier-imap courier-authlib-mysql]]></install> <install><![CDATA[apt-get install courier-pop courier-imap courier-authlib-mysql]]></install>
<file name="/etc/courier/authdaemonrc" chown="root:0" chmod="0600" <file name="/etc/courier/authdaemonrc" chown="root:0"
backup="true"> chmod="0600" backup="true">
<content><![CDATA[ <content><![CDATA[
##VERSION: $Id: authdaemonrc.in,v 1.8 2001/10/07 02:16:22 mrsam Exp $ ##VERSION: $Id: authdaemonrc.in,v 1.8 2001/10/07 02:16:22 mrsam Exp $
# #
@@ -1133,8 +1136,8 @@ authdaemonvar=/var/run/courier/authdaemon
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/courier/authmysqlrc" chown="root:0" chmod="0600" <file name="/etc/courier/authmysqlrc" chown="root:0"
backup="true"> chmod="0600" backup="true">
<content><![CDATA[ <content><![CDATA[
MYSQL_SERVER <SQL_HOST> MYSQL_SERVER <SQL_HOST>
MYSQL_USERNAME <SQL_UNPRIVILEGED_USER> MYSQL_USERNAME <SQL_UNPRIVILEGED_USER>
@@ -1162,7 +1165,8 @@ MYSQL_AUXOPTIONS_FIELD CONCAT("allowimap=",imap,",allowpop3=",pop3)
<!-- Proftpd --> <!-- Proftpd -->
<daemon name="proftpd" title="ProFTPd" default="true"> <daemon name="proftpd" title="ProFTPd" default="true">
<install><![CDATA[apt-get install proftpd-basic proftpd-mod-mysql]]></install> <install><![CDATA[apt-get install proftpd-basic proftpd-mod-mysql]]></install>
<file name="/etc/proftpd/create-cert.sh" chown="root:0" chmod="0700"> <file name="/etc/proftpd/create-cert.sh" chown="root:0"
chmod="0700">
<content><![CDATA[#!/bin/bash <content><![CDATA[#!/bin/bash
[ -f /etc/ssl/certs/proftpd.crt ] || openssl req -new -x509 -newkey rsa:4096 -days 3650 -nodes -out /etc/ssl/certs/proftpd.crt -keyout /etc/ssl/private/proftpd.key -subj "/C=US/ST=Some-State/O=Internet Widgits Pty Ltd/CN=<SERVERNAME>" [ -f /etc/ssl/certs/proftpd.crt ] || openssl req -new -x509 -newkey rsa:4096 -days 3650 -nodes -out /etc/ssl/certs/proftpd.crt -keyout /etc/ssl/private/proftpd.key -subj "/C=US/ST=Some-State/O=Internet Widgits Pty Ltd/CN=<SERVERNAME>"
[ -f /etc/ssl/certs/proftpd_ec.crt ] || openssl req -new -x509 -nodes -newkey ec:<(openssl ecparam -name secp521r1) -keyout /etc/ssl/private/proftpd_ec.key -out /etc/ssl/certs/proftpd_ec.crt -days 3650 -subj "/C=US/ST=Some-State/O=Internet Widgits Pty Ltd/CN=<SERVERNAME>" [ -f /etc/ssl/certs/proftpd_ec.crt ] || openssl req -new -x509 -nodes -newkey ec:<(openssl ecparam -name secp521r1) -keyout /etc/ssl/private/proftpd_ec.key -out /etc/ssl/certs/proftpd_ec.crt -days 3650 -subj "/C=US/ST=Some-State/O=Internet Widgits Pty Ltd/CN=<SERVERNAME>"
@@ -1174,8 +1178,8 @@ chmod 0600 /etc/ssl/private/proftpd.key /etc/ssl/private/proftpd_ec.key
<command><![CDATA[/etc/proftpd/create-cert.sh]]></command> <command><![CDATA[/etc/proftpd/create-cert.sh]]></command>
<command><![CDATA[rm -f /etc/proftpd/create-cert.sh]]></command> <command><![CDATA[rm -f /etc/proftpd/create-cert.sh]]></command>
</commands> </commands>
<file name="/etc/proftpd/proftpd.conf" chown="root:0" chmod="0600" <file name="/etc/proftpd/proftpd.conf" chown="root:0"
backup="true"> chmod="0600" backup="true">
<content><![CDATA[ <content><![CDATA[
# #
# /etc/proftpd/proftpd.conf -- This is a basic ProFTPD configuration file. # /etc/proftpd/proftpd.conf -- This is a basic ProFTPD configuration file.
@@ -1310,8 +1314,8 @@ Include /etc/proftpd/tls.conf
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/proftpd/modules.conf" chown="root:0" chmod="0644" <file name="/etc/proftpd/modules.conf" chown="root:0"
backup="true"> chmod="0644" backup="true">
<content><![CDATA[ <content><![CDATA[
# #
# This file is used to manage DSO modules and features. # This file is used to manage DSO modules and features.
@@ -1417,7 +1421,8 @@ SQLNamedQuery insert-quota-tally INSERT "%{0}, %{1}, %{2}, %{3}, %{4},%{5}, %{6}
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/proftpd/tls.conf" chown="root:root" chmod="0644" backup="true"> <file name="/etc/proftpd/tls.conf" chown="root:root"
chmod="0644" backup="true">
<content><![CDATA[ <content><![CDATA[
<IfModule mod_tls.c> <IfModule mod_tls.c>
TLSEngine on TLSEngine on
@@ -1449,14 +1454,15 @@ TLSVerifyClient off
<!-- Pureftpd --> <!-- Pureftpd -->
<daemon name="pureftpd" title="PureFTPd"> <daemon name="pureftpd" title="PureFTPd">
<install><![CDATA[apt-get install pure-ftpd-common pure-ftpd-mysql]]></install> <install><![CDATA[apt-get install pure-ftpd-common pure-ftpd-mysql]]></install>
<file name="/etc/pure-ftpd/conf/MinUID" chown="root:0" chmod="0644"> <file name="/etc/pure-ftpd/conf/MinUID" chown="root:0"
chmod="0644">
<content><![CDATA[ <content><![CDATA[
1000 1000
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/pure-ftpd/conf/MySQLConfigFile" chown="root:0" <file name="/etc/pure-ftpd/conf/MySQLConfigFile"
chmod="0644"> chown="root:0" chmod="0644">
<content><![CDATA[ <content><![CDATA[
/etc/pure-ftpd/db/mysql.conf /etc/pure-ftpd/db/mysql.conf
]]> ]]>
@@ -1483,8 +1489,8 @@ yes
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/pure-ftpd/conf/PAMAuthentication" chown="root:0" <file name="/etc/pure-ftpd/conf/PAMAuthentication"
chmod="0644"> chown="root:0" chmod="0644">
<content><![CDATA[ <content><![CDATA[
no no
]]> ]]>
@@ -1514,7 +1520,8 @@ MySQLGetQTASZ SELECT panel_customers.diskspace/1024 AS QuotaSize FROM panel_cus
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/pure-ftpd/conf/Bind" chown="root:0" chmod="0644"> <file name="/etc/pure-ftpd/conf/Bind" chown="root:0"
chmod="0644">
<content><![CDATA[ <content><![CDATA[
21 21
]]> ]]>
@@ -1537,7 +1544,8 @@ UPLOADGID=
<!-- System tools/services --> <!-- System tools/services -->
<service type="system" title="{{lng.admin.configfiles.etc}}"> <service type="system" title="{{lng.admin.configfiles.etc}}">
<!-- Cronjob --> <!-- Cronjob -->
<daemon name="cron" title="Cronjob for froxlor" mandatory="true"> <daemon name="cron" title="Cronjob for froxlor"
mandatory="true">
<file name="/etc/cron.d/froxlor" chown="root:0" chmod="0640"> <file name="/etc/cron.d/froxlor" chown="root:0" chmod="0640">
<content><![CDATA[ <content><![CDATA[
# #
@@ -1556,7 +1564,8 @@ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
<command><![CDATA[{{settings.system.crondreload}}]]></command> <command><![CDATA[{{settings.system.crondreload}}]]></command>
</daemon> </daemon>
<!-- AWstats --> <!-- AWstats -->
<daemon name="awstats" title="Awstats (webalizer alternative)"> <daemon name="awstats"
title="Awstats (webalizer alternative)">
<install><![CDATA[apt-get install awstats]]></install> <install><![CDATA[apt-get install awstats]]></install>
<command><![CDATA[cp /usr/share/awstats/tools/awstats_buildstaticpages.pl {{settings.system.awstats_path}}]]></command> <command><![CDATA[cp /usr/share/awstats/tools/awstats_buildstaticpages.pl {{settings.system.awstats_path}}]]></command>
<command><![CDATA[mv {{settings.system.awstats_conf}}/awstats.conf {{settings.system.awstats_conf}}/awstats.model.conf]]></command> <command><![CDATA[mv {{settings.system.awstats_conf}}/awstats.conf {{settings.system.awstats_conf}}/awstats.model.conf]]></command>
@@ -1565,10 +1574,11 @@ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
<command><![CDATA[rm /etc/cron.d/awstats]]></command> <command><![CDATA[rm /etc/cron.d/awstats]]></command>
</daemon> </daemon>
<!-- libnss-mysql --> <!-- libnss-mysql -->
<daemon name="libnss" title="libnss-mysql (required for FCGID/php-fpm/mpm-itk)"> <daemon name="libnss"
title="libnss-mysql (required for FCGID/php-fpm/mpm-itk)">
<install><![CDATA[apt-get install libnss-mysql-bg nscd]]></install> <install><![CDATA[apt-get install libnss-mysql-bg nscd]]></install>
<file name="/etc/libnss-mysql.cfg" chown="root:root" chmod="0600" <file name="/etc/libnss-mysql.cfg" chown="root:root"
backup="true"> chmod="0600" backup="true">
<content><![CDATA[ <content><![CDATA[
getpwnam SELECT username,'x',uid,gid,'Froxlor Customer',homedir,shell \ getpwnam SELECT username,'x',uid,gid,'Froxlor Customer',homedir,shell \
FROM ftp_users \ FROM ftp_users \
@@ -1660,7 +1670,8 @@ aliases: files
<command><![CDATA[nscd --invalidate=group]]></command> <command><![CDATA[nscd --invalidate=group]]></command>
</daemon> </daemon>
<!-- libnss-extrausers --> <!-- libnss-extrausers -->
<daemon name="libnssextrausers" title="libnss-extrausers (alternative to libnss-mysql, required for FCGID/php-fpm/mpm-itk)"> <daemon name="libnssextrausers"
title="libnss-extrausers (alternative to libnss-mysql, required for FCGID/php-fpm/mpm-itk)">
<install><![CDATA[apt-get install nscd libnss-extrausers]]></install> <install><![CDATA[apt-get install nscd libnss-extrausers]]></install>
<commands index="1"> <commands index="1">
<command><![CDATA[mkdir -p /var/lib/extrausers]]></command> <command><![CDATA[mkdir -p /var/lib/extrausers]]></command>
@@ -1700,7 +1711,8 @@ aliases: files
<!-- Logrotate --> <!-- Logrotate -->
<daemon name="logrotate" title="Logrotate"> <daemon name="logrotate" title="Logrotate">
<install><![CDATA[apt-get install logrotate]]></install> <install><![CDATA[apt-get install logrotate]]></install>
<file name="/etc/logrotate.d/froxlor" chown="root:root" chmod="0644"> <file name="/etc/logrotate.d/froxlor" chown="root:root"
chmod="0644">
<content><![CDATA[ <content><![CDATA[
# #
# Froxlor logrotate snipet # Froxlor logrotate snipet
@@ -1740,7 +1752,8 @@ aliases: files
<command><![CDATA[php {{const.\Froxlor\Froxlor::getInstallDir()}}/scripts/froxlor_master_cronjob.php --force]]></command> <command><![CDATA[php {{const.\Froxlor\Froxlor::getInstallDir()}}/scripts/froxlor_master_cronjob.php --force]]></command>
</daemon> </daemon>
<!-- PHP-FPM --> <!-- PHP-FPM -->
<daemon name="php-fpm" title="PHP-FPM (alternative to mod_php)"> <daemon name="php-fpm"
title="PHP-FPM (alternative to mod_php)">
<commands index="1"> <commands index="1">
<visibility mode="equals" value="apache2">{{settings.system.webserver}} <visibility mode="equals" value="apache2">{{settings.system.webserver}}
</visibility> </visibility>

View File

@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<froxlor> <froxlor>
<distribution name="Ubuntu" codename="Xenial" version="16.04.x" defaulteditor="/bin/nano"> <distribution name="Ubuntu" codename="Xenial"
version="16.04.x" defaulteditor="/bin/nano">
<services> <services>
<!-- HTTP --> <!-- HTTP -->
<service type="http" title="{{lng.admin.configfiles.http}}"> <service type="http" title="{{lng.admin.configfiles.http}}">
@@ -43,7 +44,8 @@
</commands> </commands>
</general> </general>
<!-- HTTP Apache --> <!-- HTTP Apache -->
<daemon name="apache" version="2.4" title="Apache 2.4" default="true"> <daemon name="apache" version="2.4" title="Apache 2.4"
default="true">
<install><![CDATA[apt-get install apache2]]></install> <install><![CDATA[apt-get install apache2]]></install>
<include>//service[@type='http']/general/commands</include> <include>//service[@type='http']/general/commands</include>
<command><![CDATA[a2dismod userdir]]></command> <command><![CDATA[a2dismod userdir]]></command>
@@ -904,8 +906,8 @@ include-dir=/etc/powerdns/froxlor/
</content> </content>
</file> </file>
<command><![CDATA[mkdir -p /etc/powerdns/froxlor/]]></command> <command><![CDATA[mkdir -p /etc/powerdns/froxlor/]]></command>
<file name="/etc/powerdns/froxlor/pdns_froxlor.conf" chown="root:root" <file name="/etc/powerdns/froxlor/pdns_froxlor.conf"
chmod="600"> chown="root:root" chmod="600">
<content><![CDATA[ <content><![CDATA[
# mysql-settings / you need to create the power-dns database for yourself! # mysql-settings / you need to create the power-dns database for yourself!
launch=gmysql launch=gmysql
@@ -920,7 +922,8 @@ gmysql-password=
</file> </file>
<command><![CDATA[/etc/init.d/pdns restart]]></command> <command><![CDATA[/etc/init.d/pdns restart]]></command>
</daemon> </daemon>
<daemon name="powerdns_bind" title="PowerDNS via bind-backend"> <daemon name="powerdns_bind"
title="PowerDNS via bind-backend">
<install><![CDATA[apt-get install pdns-server]]></install> <install><![CDATA[apt-get install pdns-server]]></install>
<file name="/etc/powerdns/pdns.conf" backup="true" chmod="600"> <file name="/etc/powerdns/pdns.conf" backup="true" chmod="600">
<content><![CDATA[ <content><![CDATA[
@@ -1447,8 +1450,8 @@ include-dir=/etc/powerdns/froxlor/
</content> </content>
</file> </file>
<command><![CDATA[mkdir -p /etc/powerdns/froxlor/]]></command> <command><![CDATA[mkdir -p /etc/powerdns/froxlor/]]></command>
<file name="/etc/powerdns/froxlor/pdns_froxlor.conf" chown="root:root" <file name="/etc/powerdns/froxlor/pdns_froxlor.conf"
chmod="600"> chown="root:root" chmod="600">
<content><![CDATA[ <content><![CDATA[
# Bind backend configuration # Bind backend configuration
@@ -1494,8 +1497,8 @@ bind-check-interval=180
<command><![CDATA[chmod 0750 {{settings.system.vmail_homedir}}]]></command> <command><![CDATA[chmod 0750 {{settings.system.vmail_homedir}}]]></command>
</commands> </commands>
<files index="0"> <files index="0">
<file name="/etc/postfix/mysql-virtual_alias_maps.cf" chown="root:postfix" <file name="/etc/postfix/mysql-virtual_alias_maps.cf"
chmod="0640"> chown="root:postfix" chmod="0640">
<content><![CDATA[ <content><![CDATA[
user = <SQL_UNPRIVILEGED_USER> user = <SQL_UNPRIVILEGED_USER>
password = <SQL_UNPRIVILEGED_PASSWORD> password = <SQL_UNPRIVILEGED_PASSWORD>
@@ -1539,8 +1542,8 @@ query = SELECT DISTINCT username FROM mail_users WHERE email in ((SELECT mail_vi
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/postfix/mysql-virtual_uid_maps.cf" chown="root:postfix" <file name="/etc/postfix/mysql-virtual_uid_maps.cf"
chmod="0640"> chown="root:postfix" chmod="0640">
<content><![CDATA[ <content><![CDATA[
user = <SQL_UNPRIVILEGED_USER> user = <SQL_UNPRIVILEGED_USER>
password = <SQL_UNPRIVILEGED_PASSWORD> password = <SQL_UNPRIVILEGED_PASSWORD>
@@ -1551,8 +1554,8 @@ query = SELECT uid FROM mail_users WHERE email = '%s'
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/postfix/mysql-virtual_gid_maps.cf" chown="root:postfix" <file name="/etc/postfix/mysql-virtual_gid_maps.cf"
chmod="0640"> chown="root:postfix" chmod="0640">
<content><![CDATA[ <content><![CDATA[
user = <SQL_UNPRIVILEGED_USER> user = <SQL_UNPRIVILEGED_USER>
password = <SQL_UNPRIVILEGED_PASSWORD> password = <SQL_UNPRIVILEGED_PASSWORD>
@@ -1599,8 +1602,8 @@ root: root@<SERVERNAME>
</include> </include>
<include>//service[@type='smtp']/general/commands[@index=2] <include>//service[@type='smtp']/general/commands[@index=2]
</include> </include>
<file name="/etc/postfix/main.cf" chown="root:root" chmod="0644" <file name="/etc/postfix/main.cf" chown="root:root"
backup="true"> chmod="0644" backup="true">
<content><![CDATA[ <content><![CDATA[
# Global Postfix configuration file. This file lists only a subset # Global Postfix configuration file. This file lists only a subset
# of all parameters. For the syntax, and for a complete parameter # of all parameters. For the syntax, and for a complete parameter
@@ -2345,8 +2348,8 @@ virtual_mailbox_limit = 0
</content> </content>
</file> </file>
<include>//service[@type='smtp']/general/files[@index=0]</include> <include>//service[@type='smtp']/general/files[@index=0]</include>
<file name="/etc/postfix/master.cf" chown="root:root" chmod="0644" <file name="/etc/postfix/master.cf" chown="root:root"
backup="true"> chmod="0644" backup="true">
<content><![CDATA[ <content><![CDATA[
# #
# Postfix master process configuration file. For details on the format # Postfix master process configuration file. For details on the format
@@ -2597,8 +2600,8 @@ dict {
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/dovecot/dovecot-sql.conf.ext" chown="root:root" <file name="/etc/dovecot/dovecot-sql.conf.ext"
chmod="0600" backup="true"> chown="root:root" chmod="0600" backup="true">
<content><![CDATA[ <content><![CDATA[
# This file is commonly accessed via passdb {} or userdb {} section in # This file is commonly accessed via passdb {} or userdb {} section in
# conf.d/auth-sql.conf.ext # conf.d/auth-sql.conf.ext
@@ -3257,8 +3260,8 @@ mail_access_groups = vmail
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/dovecot/conf.d/10-master.conf" chown="root:0" <file name="/etc/dovecot/conf.d/10-master.conf"
chmod="0644" backup="true"> chown="root:0" chmod="0644" backup="true">
<content><![CDATA[ <content><![CDATA[
#default_process_limit = 100 #default_process_limit = 100
#default_client_limit = 1000 #default_client_limit = 1000
@@ -3580,8 +3583,8 @@ protocol imap {
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/dovecot/conf.d/20-managesieve.conf" chown="root:0" <file name="/etc/dovecot/conf.d/20-managesieve.conf"
chmod="0644" backup="true"> chown="root:0" chmod="0644" backup="true">
<content><![CDATA[ <content><![CDATA[
## ##
## ManageSieve specific settings ## ManageSieve specific settings
@@ -3883,8 +3886,8 @@ plugin {
</commands> </commands>
</general> </general>
<!-- Dovecot with postfix --> <!-- Dovecot with postfix -->
<daemon name="dovecot_postfix" version="2" title="Dovecot with postfix" <daemon name="dovecot_postfix" version="2"
default="true"> title="Dovecot with postfix" default="true">
<include>//service[@type='mail']/general/installs[@index=1] <include>//service[@type='mail']/general/installs[@index=1]
</include> </include>
<include>//service[@type='mail']/general/files[@index=1] <include>//service[@type='mail']/general/files[@index=1]
@@ -3898,7 +3901,8 @@ plugin {
<!-- Proftpd --> <!-- Proftpd -->
<daemon name="proftpd" title="ProFTPd" default="true"> <daemon name="proftpd" title="ProFTPd" default="true">
<install><![CDATA[apt-get install proftpd-basic proftpd-mod-mysql]]></install> <install><![CDATA[apt-get install proftpd-basic proftpd-mod-mysql]]></install>
<file name="/etc/proftpd/create-cert.sh" chown="root:0" chmod="0700"> <file name="/etc/proftpd/create-cert.sh" chown="root:0"
chmod="0700">
<content><![CDATA[#!/bin/bash <content><![CDATA[#!/bin/bash
[ -f /etc/ssl/certs/proftpd.crt ] || openssl req -new -x509 -newkey rsa:4096 -days 3650 -nodes -out /etc/ssl/certs/proftpd.crt -keyout /etc/ssl/private/proftpd.key -subj "/C=US/ST=Some-State/O=Internet Widgits Pty Ltd/CN=<SERVERNAME>" [ -f /etc/ssl/certs/proftpd.crt ] || openssl req -new -x509 -newkey rsa:4096 -days 3650 -nodes -out /etc/ssl/certs/proftpd.crt -keyout /etc/ssl/private/proftpd.key -subj "/C=US/ST=Some-State/O=Internet Widgits Pty Ltd/CN=<SERVERNAME>"
[ -f /etc/ssl/certs/proftpd_ec.crt ] || openssl req -new -x509 -nodes -newkey ec:<(openssl ecparam -name secp521r1) -keyout /etc/ssl/private/proftpd_ec.key -out /etc/ssl/certs/proftpd_ec.crt -days 3650 -subj "/C=US/ST=Some-State/O=Internet Widgits Pty Ltd/CN=<SERVERNAME>" [ -f /etc/ssl/certs/proftpd_ec.crt ] || openssl req -new -x509 -nodes -newkey ec:<(openssl ecparam -name secp521r1) -keyout /etc/ssl/private/proftpd_ec.key -out /etc/ssl/certs/proftpd_ec.crt -days 3650 -subj "/C=US/ST=Some-State/O=Internet Widgits Pty Ltd/CN=<SERVERNAME>"
@@ -3910,8 +3914,8 @@ chmod 0600 /etc/ssl/private/proftpd.key /etc/ssl/private/proftpd_ec.key
<command><![CDATA[/etc/proftpd/create-cert.sh]]></command> <command><![CDATA[/etc/proftpd/create-cert.sh]]></command>
<command><![CDATA[rm -f /etc/proftpd/create-cert.sh]]></command> <command><![CDATA[rm -f /etc/proftpd/create-cert.sh]]></command>
</commands> </commands>
<file name="/etc/proftpd/proftpd.conf" chown="root:0" chmod="0600" <file name="/etc/proftpd/proftpd.conf" chown="root:0"
backup="true"> chmod="0600" backup="true">
<content><![CDATA[ <content><![CDATA[
# #
# /etc/proftpd/proftpd.conf -- This is a basic ProFTPD configuration file. # /etc/proftpd/proftpd.conf -- This is a basic ProFTPD configuration file.
@@ -4105,8 +4109,8 @@ Include /etc/proftpd/conf.d/
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/proftpd/modules.conf" chown="root:0" chmod="0644" <file name="/etc/proftpd/modules.conf" chown="root:0"
backup="true"> chmod="0644" backup="true">
<content><![CDATA[ <content><![CDATA[
# #
# This file is used to manage DSO modules and features. # This file is used to manage DSO modules and features.
@@ -4273,7 +4277,8 @@ SQLNamedQuery insert-quota-tally INSERT "%{0}, %{1}, %{2}, %{3}, %{4},%{5}, %{6}
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/proftpd/tls.conf" chown="root:root" chmod="0644" backup="true"> <file name="/etc/proftpd/tls.conf" chown="root:root"
chmod="0644" backup="true">
<content><![CDATA[ <content><![CDATA[
<IfModule mod_tls.c> <IfModule mod_tls.c>
TLSEngine on TLSEngine on
@@ -4305,14 +4310,15 @@ TLSVerifyClient off
<!-- Pureftpd --> <!-- Pureftpd -->
<daemon name="pureftpd" title="PureFTPd"> <daemon name="pureftpd" title="PureFTPd">
<install><![CDATA[apt-get install pure-ftpd-common pure-ftpd-mysql]]></install> <install><![CDATA[apt-get install pure-ftpd-common pure-ftpd-mysql]]></install>
<file name="/etc/pure-ftpd/conf/MinUID" chown="root:0" chmod="0644"> <file name="/etc/pure-ftpd/conf/MinUID" chown="root:0"
chmod="0644">
<content><![CDATA[ <content><![CDATA[
1000 1000
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/pure-ftpd/conf/MySQLConfigFile" chown="root:0" <file name="/etc/pure-ftpd/conf/MySQLConfigFile"
chmod="0644"> chown="root:0" chmod="0644">
<content><![CDATA[ <content><![CDATA[
/etc/pure-ftpd/db/mysql.conf /etc/pure-ftpd/db/mysql.conf
]]> ]]>
@@ -4339,8 +4345,8 @@ yes
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/pure-ftpd/conf/PAMAuthentication" chown="root:0" <file name="/etc/pure-ftpd/conf/PAMAuthentication"
chmod="0644"> chown="root:0" chmod="0644">
<content><![CDATA[ <content><![CDATA[
no no
]]> ]]>
@@ -4486,7 +4492,8 @@ MySQLGetQTASZ SELECT panel_customers.diskspace/1024 AS QuotaSize FROM panel_cus
]]> ]]>
</content> </content>
</file> </file>
<file name="/etc/pure-ftpd/conf/Bind" chown="root:0" chmod="0644"> <file name="/etc/pure-ftpd/conf/Bind" chown="root:0"
chmod="0644">
<content><![CDATA[ <content><![CDATA[
21 21
]]> ]]>
@@ -4530,7 +4537,8 @@ UPLOADGID=
<!-- System tools/services --> <!-- System tools/services -->
<service type="system" title="{{lng.admin.configfiles.etc}}"> <service type="system" title="{{lng.admin.configfiles.etc}}">
<!-- Cronjob --> <!-- Cronjob -->
<daemon name="cron" title="Cronjob for froxlor" mandatory="true"> <daemon name="cron" title="Cronjob for froxlor"
mandatory="true">
<file name="/etc/cron.d/froxlor" chown="root:0" chmod="0640"> <file name="/etc/cron.d/froxlor" chown="root:0" chmod="0640">
<content><![CDATA[ <content><![CDATA[
# #
@@ -4549,7 +4557,8 @@ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
<command><![CDATA[{{settings.system.crondreload}}]]></command> <command><![CDATA[{{settings.system.crondreload}}]]></command>
</daemon> </daemon>
<!-- AWstats --> <!-- AWstats -->
<daemon name="awstats" title="Awstats (webalizer alternative)"> <daemon name="awstats"
title="Awstats (webalizer alternative)">
<install><![CDATA[apt-get install awstats]]></install> <install><![CDATA[apt-get install awstats]]></install>
<command><![CDATA[cp /usr/share/awstats/tools/awstats_buildstaticpages.pl {{settings.system.awstats_path}}]]></command> <command><![CDATA[cp /usr/share/awstats/tools/awstats_buildstaticpages.pl {{settings.system.awstats_path}}]]></command>
<command><![CDATA[mv {{settings.system.awstats_conf}}/awstats.conf {{settings.system.awstats_conf}}/awstats.model.conf]]></command> <command><![CDATA[mv {{settings.system.awstats_conf}}/awstats.conf {{settings.system.awstats_conf}}/awstats.model.conf]]></command>
@@ -4558,7 +4567,8 @@ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
<command><![CDATA[rm /etc/cron.d/awstats]]></command> <command><![CDATA[rm /etc/cron.d/awstats]]></command>
</daemon> </daemon>
<!-- libnss-extrausers --> <!-- libnss-extrausers -->
<daemon name="libnssextrausers" title="libnss-extrausers (alternative to libnss-mysql, required for FCGID/php-fpm/mpm-itk)"> <daemon name="libnssextrausers"
title="libnss-extrausers (alternative to libnss-mysql, required for FCGID/php-fpm/mpm-itk)">
<install><![CDATA[apt-get install nscd libnss-extrausers]]></install> <install><![CDATA[apt-get install nscd libnss-extrausers]]></install>
<commands index="1"> <commands index="1">
<command><![CDATA[mkdir -p /var/lib/extrausers]]></command> <command><![CDATA[mkdir -p /var/lib/extrausers]]></command>
@@ -4598,7 +4608,8 @@ aliases: files
<!-- Logrotate --> <!-- Logrotate -->
<daemon name="logrotate" title="Logrotate"> <daemon name="logrotate" title="Logrotate">
<install><![CDATA[apt-get install logrotate]]></install> <install><![CDATA[apt-get install logrotate]]></install>
<file name="/etc/logrotate.d/froxlor" chown="root:root" chmod="0644"> <file name="/etc/logrotate.d/froxlor" chown="root:root"
chmod="0644">
<content><![CDATA[ <content><![CDATA[
# #
# Froxlor logrotate snipet # Froxlor logrotate snipet
@@ -4638,7 +4649,8 @@ aliases: files
<command><![CDATA[php {{const.\Froxlor\Froxlor::getInstallDir()}}/scripts/froxlor_master_cronjob.php --force]]></command> <command><![CDATA[php {{const.\Froxlor\Froxlor::getInstallDir()}}/scripts/froxlor_master_cronjob.php --force]]></command>
</daemon> </daemon>
<!-- PHP-FPM --> <!-- PHP-FPM -->
<daemon name="php-fpm" title="PHP-FPM (alternative to mod_php)"> <daemon name="php-fpm"
title="PHP-FPM (alternative to mod_php)">
<install> <install>
<visibility mode="equals" value="apache2">{{settings.system.webserver}} <visibility mode="equals" value="apache2">{{settings.system.webserver}}
</visibility> </visibility>

View File

@@ -1,5 +1,4 @@
<?php <?php
if (! defined('MASTER_CRONJOB')) if (! defined('MASTER_CRONJOB'))
die('You cannot access this file directly!'); die('You cannot access this file directly!');

View File

@@ -14,7 +14,6 @@
* @package Formfields * @package Formfields
* *
*/ */
return array( return array(
'admin_add' => array( 'admin_add' => array(
'title' => $lng['admin']['admin_add'], 'title' => $lng['admin']['admin_add'],
@@ -39,7 +38,7 @@ return array(
'label' => $lng['customer']['generated_pwd'], 'label' => $lng['customer']['generated_pwd'],
'type' => 'text', 'type' => 'text',
'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''), 'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''),
'value' => \Froxlor\System\Crypt::generatePassword(), 'value' => \Froxlor\System\Crypt::generatePassword()
), ),
'def_language' => array( 'def_language' => array(
'label' => $lng['login']['language'], 'label' => $lng['login']['language'],
@@ -74,7 +73,10 @@ return array(
'label' => $lng['usersettings']['custom_notes']['show'], 'label' => $lng['usersettings']['custom_notes']['show'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1') array(
'label' => $lng['panel']['yes'],
'value' => '1'
)
), ),
'value' => array() 'value' => array()
) )
@@ -93,7 +95,10 @@ return array(
'label' => $lng['admin']['change_serversettings'], 'label' => $lng['admin']['change_serversettings'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1') array(
'label' => $lng['panel']['yes'],
'value' => '1'
)
), ),
'value' => array() 'value' => array()
), ),
@@ -109,7 +114,10 @@ return array(
'label' => $lng['admin']['customers_see_all'], 'label' => $lng['admin']['customers_see_all'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1') array(
'label' => $lng['panel']['yes'],
'value' => '1'
)
), ),
'value' => array() 'value' => array()
), ),
@@ -125,7 +133,10 @@ return array(
'label' => $lng['admin']['domains_see_all'], 'label' => $lng['admin']['domains_see_all'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1') array(
'label' => $lng['panel']['yes'],
'value' => '1'
)
), ),
'value' => array() 'value' => array()
), ),
@@ -133,7 +144,10 @@ return array(
'label' => $lng['admin']['caneditphpsettings'], 'label' => $lng['admin']['caneditphpsettings'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1') array(
'label' => $lng['panel']['yes'],
'value' => '1'
)
), ),
'value' => array() 'value' => array()
), ),

View File

@@ -14,7 +14,6 @@
* @package Formfields * @package Formfields
* *
*/ */
return array( return array(
'admin_edit' => array( 'admin_edit' => array(
'title' => $lng['admin']['admin_edit'], 'title' => $lng['admin']['admin_edit'],
@@ -33,9 +32,14 @@ return array(
'label' => $lng['admin']['deactivated_user'], 'label' => $lng['admin']['deactivated_user'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1') array(
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array(
$result['deactivated']
), ),
'value' => array($result['deactivated']),
'visible' => ($result['adminid'] == $userinfo['userid'] ? false : true) 'visible' => ($result['adminid'] == $userinfo['userid'] ? false : true)
), ),
'admin_password' => array( 'admin_password' => array(
@@ -88,9 +92,14 @@ return array(
'label' => $lng['usersettings']['custom_notes']['show'], 'label' => $lng['usersettings']['custom_notes']['show'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1') array(
'label' => $lng['panel']['yes'],
'value' => '1'
)
), ),
'value' => array($result['custom_notes_show']) 'value' => array(
$result['custom_notes_show']
)
) )
) )
), ),
@@ -108,9 +117,14 @@ return array(
'label' => $lng['admin']['change_serversettings'], 'label' => $lng['admin']['change_serversettings'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1') array(
'label' => $lng['panel']['yes'],
'value' => '1'
)
), ),
'value' => array($result['change_serversettings']) 'value' => array(
$result['change_serversettings']
)
), ),
'customers' => array( 'customers' => array(
'label' => $lng['admin']['customers'], 'label' => $lng['admin']['customers'],
@@ -124,9 +138,14 @@ return array(
'label' => $lng['admin']['customers_see_all'], 'label' => $lng['admin']['customers_see_all'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1') array(
'label' => $lng['panel']['yes'],
'value' => '1'
)
), ),
'value' => array($result['customers_see_all']) 'value' => array(
$result['customers_see_all']
)
), ),
'domains' => array( 'domains' => array(
'label' => $lng['admin']['domains'], 'label' => $lng['admin']['domains'],
@@ -140,17 +159,27 @@ return array(
'label' => $lng['admin']['domains_see_all'], 'label' => $lng['admin']['domains_see_all'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1') array(
'label' => $lng['panel']['yes'],
'value' => '1'
)
), ),
'value' => array($result['domains_see_all']) 'value' => array(
$result['domains_see_all']
)
), ),
'caneditphpsettings' => array( 'caneditphpsettings' => array(
'label' => $lng['admin']['caneditphpsettings'], 'label' => $lng['admin']['caneditphpsettings'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1') array(
'label' => $lng['panel']['yes'],
'value' => '1'
)
), ),
'value' => array($result['caneditphpsettings']) 'value' => array(
$result['caneditphpsettings']
)
), ),
'diskspace' => array( 'diskspace' => array(
'label' => $lng['customer']['diskspace'], 'label' => $lng['customer']['diskspace'],

View File

@@ -14,7 +14,6 @@
* @package Formfields * @package Formfields
* *
*/ */
return array( return array(
'cronjobs_edit' => array( 'cronjobs_edit' => array(
'title' => $lng['admin']['cronjob_edit'], 'title' => $lng['admin']['cronjob_edit'],
@@ -33,9 +32,14 @@ return array(
'label' => $lng['admin']['activated'], 'label' => $lng['admin']['activated'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1') array(
'label' => $lng['panel']['yes'],
'value' => '1'
)
), ),
'value' => array($result['isactive']) 'value' => array(
$result['isactive']
)
), ),
'interval_value' => array( 'interval_value' => array(
'label' => $lng['cronjob']['cronjobintervalv'], 'label' => $lng['cronjob']['cronjobintervalv'],

View File

@@ -14,7 +14,6 @@
* @package Formfields * @package Formfields
* *
*/ */
return array( return array(
'customer_edit' => array( 'customer_edit' => array(
'title' => $lng['admin']['customer_edit'], 'title' => $lng['admin']['customer_edit'],
@@ -38,17 +37,27 @@ return array(
'label' => $lng['admin']['stdsubdomain_add'] . '?', 'label' => $lng['admin']['stdsubdomain_add'] . '?',
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1') array(
'label' => $lng['panel']['yes'],
'value' => '1'
)
), ),
'value' => array(($result['standardsubdomain'] != '0') ? '1' : '0') 'value' => array(
($result['standardsubdomain'] != '0') ? '1' : '0'
)
), ),
'deactivated' => array( 'deactivated' => array(
'label' => $lng['admin']['deactivated_user'], 'label' => $lng['admin']['deactivated_user'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1') array(
'label' => $lng['panel']['yes'],
'value' => '1'
)
), ),
'value' => array($result['deactivated']) 'value' => array(
$result['deactivated']
)
), ),
'new_customer_password' => array( 'new_customer_password' => array(
'label' => $lng['login']['password'] . '&nbsp;(' . $lng['panel']['emptyfornochanges'] . ')', 'label' => $lng['login']['password'] . '&nbsp;(' . $lng['panel']['emptyfornochanges'] . ')',
@@ -59,7 +68,7 @@ return array(
'label' => $lng['customer']['generated_pwd'], 'label' => $lng['customer']['generated_pwd'],
'type' => 'text', 'type' => 'text',
'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''), 'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''),
'value' => \Froxlor\System\Crypt::generatePassword(), 'value' => \Froxlor\System\Crypt::generatePassword()
), ),
'def_language' => array( 'def_language' => array(
'label' => $lng['login']['language'], 'label' => $lng['login']['language'],
@@ -144,9 +153,14 @@ return array(
'label' => $lng['usersettings']['custom_notes']['show'], 'label' => $lng['usersettings']['custom_notes']['show'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1') array(
'label' => $lng['panel']['yes'],
'value' => '1'
)
), ),
'value' => array($result['custom_notes_show']) 'value' => array(
$result['custom_notes_show']
)
) )
) )
), ),
@@ -227,18 +241,28 @@ return array(
'label' => $lng['customer']['email_imap'], 'label' => $lng['customer']['email_imap'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1') array(
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array(
$result['imap']
), ),
'value' => array($result['imap']),
'mandatory' => true 'mandatory' => true
), ),
'email_pop3' => array( 'email_pop3' => array(
'label' => $lng['customer']['email_pop3'], 'label' => $lng['customer']['email_pop3'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1') array(
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array(
$result['pop3']
), ),
'value' => array($result['pop3']),
'mandatory' => true 'mandatory' => true
), ),
'ftps' => array( 'ftps' => array(
@@ -260,9 +284,14 @@ return array(
'label' => $lng['admin']['phpenabled'] . '?', 'label' => $lng['admin']['phpenabled'] . '?',
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1') array(
'label' => $lng['panel']['yes'],
'value' => '1'
)
), ),
'value' => array($result['phpenabled']) 'value' => array(
$result['phpenabled']
)
), ),
'allowed_phpconfigs' => array( 'allowed_phpconfigs' => array(
'visible' => (((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 || (int) \Froxlor\Settings::Get('phpfpm.enabled') == 1) ? true : false), 'visible' => (((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 || (int) \Froxlor\Settings::Get('phpfpm.enabled') == 1) ? true : false),
@@ -276,17 +305,27 @@ return array(
'label' => $lng['admin']['perlenabled'] . '?', 'label' => $lng['admin']['perlenabled'] . '?',
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1') array(
'label' => $lng['panel']['yes'],
'value' => '1'
)
), ),
'value' => array($result['perlenabled']) 'value' => array(
$result['perlenabled']
)
), ),
'dnsenabled' => array( 'dnsenabled' => array(
'label' => $lng['admin']['dnsenabled'] . '?', 'label' => $lng['admin']['dnsenabled'] . '?',
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1') array(
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array(
$result['dnsenabled']
), ),
'value' => array($result['dnsenabled']),
'visible' => (\Froxlor\Settings::Get('system.dnsenabled') == '1' ? true : false) 'visible' => (\Froxlor\Settings::Get('system.dnsenabled') == '1' ? true : false)
), ),
'logviewenabled' => array( 'logviewenabled' => array(
@@ -298,7 +337,9 @@ return array(
'value' => '1' 'value' => '1'
) )
), ),
'value' => array($result['logviewenabled']) 'value' => array(
$result['logviewenabled']
)
) )
) )
), ),

View File

@@ -155,7 +155,9 @@ return array(
'value' => '1' 'value' => '1'
) )
), ),
'value' => array('1') 'value' => array(
'1'
)
), ),
'writeerrorlog' => array( 'writeerrorlog' => array(
'label' => $lng['admin']['writeerrorlog']['title'], 'label' => $lng['admin']['writeerrorlog']['title'],
@@ -167,7 +169,9 @@ return array(
'value' => '1' 'value' => '1'
) )
), ),
'value' => array('1') 'value' => array(
'1'
)
) )
) )
), ),
@@ -265,13 +269,9 @@ return array(
'value' => array() 'value' => array()
), ),
'ocsp_stapling' => array( 'ocsp_stapling' => array(
'visible' => ($ssl_ipsandports != '' ? true : false) && 'visible' => ($ssl_ipsandports != '' ? true : false) && \Froxlor\Settings::Get('system.webserver') != 'lighttpd',
\Froxlor\Settings::Get('system.webserver') != 'lighttpd',
'label' => $lng['admin']['domain_ocsp_stapling']['title'], 'label' => $lng['admin']['domain_ocsp_stapling']['title'],
'desc' => $lng['admin']['domain_ocsp_stapling']['description'] . 'desc' => $lng['admin']['domain_ocsp_stapling']['description'] . (\Froxlor\Settings::Get('system.webserver') == 'nginx' ? $lng['admin']['domain_ocsp_stapling']['nginx_version_warning'] : ""),
(\Froxlor\Settings::Get('system.webserver') == 'nginx' ?
$lng['admin']['domain_ocsp_stapling']['nginx_version_warning'] :
""),
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(
array( array(
@@ -280,7 +280,7 @@ return array(
) )
), ),
'value' => array() 'value' => array()
), )
) )
), ),
'section_c' => array( 'section_c' => array(

View File

@@ -187,7 +187,9 @@ return array(
'value' => '1' 'value' => '1'
) )
), ),
'value' => array($result['writeaccesslog']) 'value' => array(
$result['writeaccesslog']
)
), ),
'writeerrorlog' => array( 'writeerrorlog' => array(
'label' => $lng['admin']['writeerrorlog']['title'], 'label' => $lng['admin']['writeerrorlog']['title'],
@@ -199,7 +201,9 @@ return array(
'value' => '1' 'value' => '1'
) )
), ),
'value' => array($result['writeerrorlog']) 'value' => array(
$result['writeerrorlog']
)
) )
) )
), ),
@@ -307,13 +311,9 @@ return array(
) )
), ),
'ocsp_stapling' => array( 'ocsp_stapling' => array(
'visible' => ($ssl_ipsandports != '' ? true : false) && 'visible' => ($ssl_ipsandports != '' ? true : false) && \Froxlor\Settings::Get('system.webserver') != 'lighttpd',
\Froxlor\Settings::Get('system.webserver') != 'lighttpd',
'label' => $lng['admin']['domain_ocsp_stapling']['title'], 'label' => $lng['admin']['domain_ocsp_stapling']['title'],
'desc' => $lng['admin']['domain_ocsp_stapling']['description'] . 'desc' => $lng['admin']['domain_ocsp_stapling']['description'] . (\Froxlor\Settings::Get('system.webserver') == 'nginx' ? $lng['admin']['domain_ocsp_stapling']['nginx_version_warning'] : ""),
(\Froxlor\Settings::Get('system.webserver') == 'nginx' ?
$lng['admin']['domain_ocsp_stapling']['nginx_version_warning'] :
""),
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(
array( array(
@@ -324,7 +324,7 @@ return array(
'value' => array( 'value' => array(
$result['ocsp_stapling'] $result['ocsp_stapling']
) )
), )
) )
), ),
'section_c' => array( 'section_c' => array(

View File

@@ -14,7 +14,6 @@
* @package Formfields * @package Formfields
* *
*/ */
return array( return array(
'domain_import' => array( 'domain_import' => array(
'title' => $lng['domains']['domain_import'], 'title' => $lng['domains']['domain_import'],
@@ -28,7 +27,7 @@ return array(
'label' => $lng['admin']['customer'], 'label' => $lng['admin']['customer'],
'type' => 'select', 'type' => 'select',
'select_var' => $customers, 'select_var' => $customers,
'mandatory' => true, 'mandatory' => true
), ),
'separator' => array( 'separator' => array(
'label' => $lng['domains']['import_separator'], 'label' => $lng['domains']['import_separator'],

View File

@@ -14,7 +14,6 @@
* @package Formfields * @package Formfields
* *
*/ */
return array( return array(
'ipsandports_add' => array( 'ipsandports_add' => array(
'title' => $lng['admin']['ipsandports']['add'], 'title' => $lng['admin']['ipsandports']['add'],
@@ -44,26 +43,41 @@ return array(
'label' => $lng['admin']['ipsandports']['create_listen_statement'], 'label' => $lng['admin']['ipsandports']['create_listen_statement'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1') array(
'label' => $lng['panel']['yes'],
'value' => '1'
)
), ),
'value' => array('1') 'value' => array(
'1'
)
), ),
'namevirtualhost_statement' => array( 'namevirtualhost_statement' => array(
'visible' => $is_apache && ! $is_apache24, 'visible' => $is_apache && ! $is_apache24,
'label' => $lng['admin']['ipsandports']['create_namevirtualhost_statement'], 'label' => $lng['admin']['ipsandports']['create_namevirtualhost_statement'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1') array(
'label' => $lng['panel']['yes'],
'value' => '1'
)
), ),
'value' => array('1') 'value' => array(
'1'
)
), ),
'vhostcontainer' => array( 'vhostcontainer' => array(
'label' => $lng['admin']['ipsandports']['create_vhostcontainer'], 'label' => $lng['admin']['ipsandports']['create_vhostcontainer'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1') array(
'label' => $lng['panel']['yes'],
'value' => '1'
)
), ),
'value' => array('1') 'value' => array(
'1'
)
), ),
'docroot' => array( 'docroot' => array(
'label' => $lng['admin']['ipsandports']['docroot']['title'], 'label' => $lng['admin']['ipsandports']['docroot']['title'],
@@ -83,9 +97,14 @@ return array(
'label' => $lng['admin']['ipsandports']['create_vhostcontainer_servername_statement'], 'label' => $lng['admin']['ipsandports']['create_vhostcontainer_servername_statement'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1') array(
'label' => $lng['panel']['yes'],
'value' => '1'
)
), ),
'value' => array('1') 'value' => array(
'1'
)
) )
) )
), ),
@@ -112,7 +131,10 @@ return array(
'label' => $lng['admin']['ipsandports']['enable_ssl'], 'label' => $lng['admin']['ipsandports']['enable_ssl'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1') array(
'label' => $lng['panel']['yes'],
'value' => '1'
)
), ),
'value' => array() 'value' => array()
), ),

View File

@@ -14,7 +14,6 @@
* @package Formfields * @package Formfields
* *
*/ */
return array( return array(
'ipsandports_edit' => array( 'ipsandports_edit' => array(
'title' => $lng['admin']['ipsandports']['edit'], 'title' => $lng['admin']['ipsandports']['edit'],
@@ -46,26 +45,41 @@ return array(
'label' => $lng['admin']['ipsandports']['create_listen_statement'], 'label' => $lng['admin']['ipsandports']['create_listen_statement'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1') array(
'label' => $lng['panel']['yes'],
'value' => '1'
)
), ),
'value' => array($result['listen_statement']) 'value' => array(
$result['listen_statement']
)
), ),
'namevirtualhost_statement' => array( 'namevirtualhost_statement' => array(
'visible' => $is_apache && ! $is_apache24, 'visible' => $is_apache && ! $is_apache24,
'label' => $lng['admin']['ipsandports']['create_namevirtualhost_statement'], 'label' => $lng['admin']['ipsandports']['create_namevirtualhost_statement'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1') array(
'label' => $lng['panel']['yes'],
'value' => '1'
)
), ),
'value' => array($result['namevirtualhost_statement']) 'value' => array(
$result['namevirtualhost_statement']
)
), ),
'vhostcontainer' => array( 'vhostcontainer' => array(
'label' => $lng['admin']['ipsandports']['create_vhostcontainer'], 'label' => $lng['admin']['ipsandports']['create_vhostcontainer'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1') array(
'label' => $lng['panel']['yes'],
'value' => '1'
)
), ),
'value' => array($result['vhostcontainer']) 'value' => array(
$result['vhostcontainer']
)
), ),
'docroot' => array( 'docroot' => array(
'label' => $lng['admin']['ipsandports']['docroot']['title'], 'label' => $lng['admin']['ipsandports']['docroot']['title'],
@@ -87,9 +101,14 @@ return array(
'label' => $lng['admin']['ipsandports']['create_vhostcontainer_servername_statement'], 'label' => $lng['admin']['ipsandports']['create_vhostcontainer_servername_statement'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1') array(
'label' => $lng['panel']['yes'],
'value' => '1'
)
), ),
'value' => array($result['vhostcontainer_servername_statement']) 'value' => array(
$result['vhostcontainer_servername_statement']
)
) )
) )
), ),
@@ -117,9 +136,14 @@ return array(
'label' => $lng['admin']['ipsandports']['enable_ssl'], 'label' => $lng['admin']['ipsandports']['enable_ssl'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1') array(
'label' => $lng['panel']['yes'],
'value' => '1'
)
), ),
'value' => array($result['ssl']) 'value' => array(
$result['ssl']
)
), ),
'ssl_cert_file' => array( 'ssl_cert_file' => array(
'label' => $lng['admin']['ipsandports']['ssl_cert_file'], 'label' => $lng['admin']['ipsandports']['ssl_cert_file'],

View File

@@ -14,7 +14,6 @@
* @package Formfields * @package Formfields
* *
*/ */
return array( return array(
'fpmconfig_add' => array( 'fpmconfig_add' => array(
'title' => $lng['admin']['phpsettings']['addsettings'], 'title' => $lng['admin']['phpsettings']['addsettings'],

View File

@@ -14,7 +14,6 @@
* @package Formfields * @package Formfields
* *
*/ */
return array( return array(
'fpmconfig_edit' => array( 'fpmconfig_edit' => array(
'title' => $lng['admin']['phpsettings']['editsettings'], 'title' => $lng['admin']['phpsettings']['editsettings'],

View File

@@ -14,7 +14,6 @@
* @package Formfields * @package Formfields
* *
*/ */
return array( return array(
'phpconfig_add' => array( 'phpconfig_add' => array(
'title' => $lng['admin']['phpsettings']['addsettings'], 'title' => $lng['admin']['phpsettings']['addsettings'],
@@ -72,7 +71,10 @@ return array(
'label' => $lng['admin']['phpsettings']['enable_slowlog'], 'label' => $lng['admin']['phpsettings']['enable_slowlog'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1') array(
'label' => $lng['panel']['yes'],
'value' => '1'
)
), ),
'value' => array() 'value' => array()
), ),
@@ -95,7 +97,10 @@ return array(
'label' => $lng['admin']['phpsettings']['pass_authorizationheader'], 'label' => $lng['admin']['phpsettings']['pass_authorizationheader'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1') array(
'label' => $lng['panel']['yes'],
'value' => '1'
)
), ),
'value' => array() 'value' => array()
), ),
@@ -104,7 +109,10 @@ return array(
'label' => $lng['serversettings']['phpfpm_settings']['override_fpmconfig'], 'label' => $lng['serversettings']['phpfpm_settings']['override_fpmconfig'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1') array(
'label' => $lng['panel']['yes'],
'value' => '1'
)
), ),
'value' => array() 'value' => array()
), ),

View File

@@ -14,7 +14,6 @@
* @package Formfields * @package Formfields
* *
*/ */
return array( return array(
'phpconfig_edit' => array( 'phpconfig_edit' => array(
'title' => $lng['admin']['phpsettings']['editsettings'], 'title' => $lng['admin']['phpsettings']['editsettings'],
@@ -75,9 +74,14 @@ return array(
'label' => $lng['admin']['phpsettings']['enable_slowlog'], 'label' => $lng['admin']['phpsettings']['enable_slowlog'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1') array(
'label' => $lng['panel']['yes'],
'value' => '1'
)
), ),
'value' => array($result['fpm_slowlog']) 'value' => array(
$result['fpm_slowlog']
)
), ),
'phpfpm_reqtermtimeout' => array( 'phpfpm_reqtermtimeout' => array(
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
@@ -98,17 +102,27 @@ return array(
'label' => $lng['admin']['phpsettings']['pass_authorizationheader'], 'label' => $lng['admin']['phpsettings']['pass_authorizationheader'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1') array(
'label' => $lng['panel']['yes'],
'value' => '1'
)
), ),
'value' => array($result['pass_authorizationheader']) 'value' => array(
$result['pass_authorizationheader']
)
), ),
'override_fpmconfig' => array( 'override_fpmconfig' => array(
'label' => $lng['serversettings']['phpfpm_settings']['override_fpmconfig'], 'label' => $lng['serversettings']['phpfpm_settings']['override_fpmconfig'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1') array(
'label' => $lng['panel']['yes'],
'value' => '1'
)
), ),
'value' => array($result['override_fpmconfig']) 'value' => array(
$result['override_fpmconfig']
)
), ),
'pm' => array( 'pm' => array(
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),

View File

@@ -14,7 +14,6 @@
* @package Formfields * @package Formfields
* *
*/ */
return array( return array(
'plans_add' => array( 'plans_add' => array(
'title' => $lng['admin']['plans']['add'], 'title' => $lng['admin']['plans']['add'],

View File

@@ -14,7 +14,6 @@
* @package Formfields * @package Formfields
* *
*/ */
return array( return array(
'plans_edit' => array( 'plans_edit' => array(
'title' => $lng['admin']['plans']['edit'], 'title' => $lng['admin']['plans']['edit'],

View File

@@ -14,7 +14,6 @@
* @package Formfields * @package Formfields
* *
*/ */
return array( return array(
'filetemplate_add' => array( 'filetemplate_add' => array(
'title' => $lng['admin']['templates']['template_add'], 'title' => $lng['admin']['templates']['template_add'],

View File

@@ -14,7 +14,6 @@
* @package Formfields * @package Formfields
* *
*/ */
return array( return array(
'filetemplate_edit' => array( 'filetemplate_edit' => array(
'title' => $lng['admin']['templates']['template_edit'], 'title' => $lng['admin']['templates']['template_edit'],

View File

@@ -14,7 +14,6 @@
* @package Formfields * @package Formfields
* *
*/ */
return array( return array(
'template_add' => array( 'template_add' => array(
'title' => $lng['admin']['templates']['template_add'], 'title' => $lng['admin']['templates']['template_add'],

View File

@@ -14,7 +14,6 @@
* @package Formfields * @package Formfields
* *
*/ */
return array( return array(
'template_edit' => array( 'template_edit' => array(
'title' => $lng['admin']['templates']['template_edit'], 'title' => $lng['admin']['templates']['template_edit'],

View File

@@ -14,7 +14,6 @@
* @package Formfields * @package Formfields
* *
*/ */
return array( return array(
'domain_ssleditor' => array( 'domain_ssleditor' => array(
'title' => $lng['panel']['ssleditor'], 'title' => $lng['panel']['ssleditor'],

View File

@@ -14,7 +14,6 @@
* @package Formfields * @package Formfields
* *
*/ */
return array( return array(
'domain_add' => array( 'domain_add' => array(
'title' => $lng['domains']['subdomain_add'], 'title' => $lng['domains']['subdomain_add'],
@@ -89,7 +88,10 @@ return array(
'desc' => $lng['domains']['ssl_redirect']['description'], 'desc' => $lng['domains']['ssl_redirect']['description'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1') array(
'label' => $lng['panel']['yes'],
'value' => '1'
)
), ),
'value' => array() 'value' => array()
), ),
@@ -99,7 +101,10 @@ return array(
'desc' => $lng['customer']['letsencrypt']['description'], 'desc' => $lng['customer']['letsencrypt']['description'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1') array(
'label' => $lng['panel']['yes'],
'value' => '1'
)
), ),
'value' => array() 'value' => array()
), ),
@@ -116,7 +121,10 @@ return array(
'desc' => $lng['admin']['domain_hsts_incsub']['description'], 'desc' => $lng['admin']['domain_hsts_incsub']['description'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1') array(
'label' => $lng['panel']['yes'],
'value' => '1'
)
), ),
'value' => array() 'value' => array()
), ),
@@ -125,12 +133,15 @@ return array(
'desc' => $lng['admin']['domain_hsts_preload']['description'], 'desc' => $lng['admin']['domain_hsts_preload']['description'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1') array(
'label' => $lng['panel']['yes'],
'value' => '1'
)
), ),
'value' => array() 'value' => array()
), )
), )
), )
) )
) )
); );

View File

@@ -14,7 +14,6 @@
* @package Formfields * @package Formfields
* *
*/ */
return array( return array(
'domain_edit' => array( 'domain_edit' => array(
'title' => $lng['domains']['subdomain_edit'], 'title' => $lng['domains']['subdomain_edit'],
@@ -72,9 +71,14 @@ return array(
'label' => 'Emaildomain', 'label' => 'Emaildomain',
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1') array(
'label' => $lng['panel']['yes'],
'value' => '1'
)
), ),
'value' => array($result['isemaildomain']) 'value' => array(
$result['isemaildomain']
)
), ),
'openbasedir_path' => array( 'openbasedir_path' => array(
'visible' => ($result['openbasedir'] == '1') ? true : false, 'visible' => ($result['openbasedir'] == '1') ? true : false,
@@ -100,9 +104,14 @@ return array(
'desc' => $lng['domains']['ssl_redirect']['description'] . ($result['temporary_ssl_redirect'] > 1 ? $lng['domains']['ssl_redirect_temporarilydisabled'] : ''), 'desc' => $lng['domains']['ssl_redirect']['description'] . ($result['temporary_ssl_redirect'] > 1 ? $lng['domains']['ssl_redirect_temporarilydisabled'] : ''),
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1') array(
'label' => $lng['panel']['yes'],
'value' => '1'
)
), ),
'value' => array($result['ssl_redirect']) 'value' => array(
$result['ssl_redirect']
)
), ),
'letsencrypt' => array( 'letsencrypt' => array(
'visible' => \Froxlor\Settings::Get('system.leenabled') == '1' ? true : false, 'visible' => \Froxlor\Settings::Get('system.leenabled') == '1' ? true : false,
@@ -110,9 +119,14 @@ return array(
'desc' => $lng['customer']['letsencrypt']['description'], 'desc' => $lng['customer']['letsencrypt']['description'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1') array(
'label' => $lng['panel']['yes'],
'value' => '1'
)
), ),
'value' => array($result['letsencrypt']) 'value' => array(
$result['letsencrypt']
)
), ),
'hsts_maxage' => array( 'hsts_maxage' => array(
'label' => $lng['admin']['domain_hsts_maxage']['title'], 'label' => $lng['admin']['domain_hsts_maxage']['title'],
@@ -127,21 +141,31 @@ return array(
'desc' => $lng['admin']['domain_hsts_incsub']['description'], 'desc' => $lng['admin']['domain_hsts_incsub']['description'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1') array(
'label' => $lng['panel']['yes'],
'value' => '1'
)
), ),
'value' => array($result['hsts_sub']) 'value' => array(
$result['hsts_sub']
)
), ),
'hsts_preload' => array( 'hsts_preload' => array(
'label' => $lng['admin']['domain_hsts_preload']['title'], 'label' => $lng['admin']['domain_hsts_preload']['title'],
'desc' => $lng['admin']['domain_hsts_preload']['description'], 'desc' => $lng['admin']['domain_hsts_preload']['description'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1') array(
), 'label' => $lng['panel']['yes'],
'value' => array($result['hsts_preload']) 'value' => '1'
),
) )
), ),
'value' => array(
$result['hsts_preload']
)
)
)
)
) )
) )
); );

View File

@@ -14,7 +14,6 @@
* @package Formfields * @package Formfields
* *
*/ */
return array( return array(
'emails_accountchangepasswd' => array( 'emails_accountchangepasswd' => array(
'title' => $lng['menue']['main']['changepassword'], 'title' => $lng['menue']['main']['changepassword'],
@@ -38,7 +37,7 @@ return array(
'label' => $lng['customer']['generated_pwd'], 'label' => $lng['customer']['generated_pwd'],
'type' => 'text', 'type' => 'text',
'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''), 'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''),
'value' => \Froxlor\System\Crypt::generatePassword(), 'value' => \Froxlor\System\Crypt::generatePassword()
) )
) )
) )

View File

@@ -14,7 +14,6 @@
* @package Formfields * @package Formfields
* *
*/ */
return array( return array(
'emails_accountchangequota' => array( 'emails_accountchangequota' => array(
'title' => $lng['emails']['quota_edit'], 'title' => $lng['emails']['quota_edit'],

View File

@@ -14,7 +14,6 @@
* @package Formfields * @package Formfields
* *
*/ */
return array( return array(
'emails_add' => array( 'emails_add' => array(
'title' => $lng['emails']['emails_add'], 'title' => $lng['emails']['emails_add'],
@@ -40,7 +39,10 @@ return array(
'label' => $lng['emails']['iscatchall'], 'label' => $lng['emails']['iscatchall'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1') array(
'label' => $lng['panel']['yes'],
'value' => '1'
)
), ),
'value' => array() 'value' => array()
) )

View File

@@ -14,7 +14,6 @@
* @package Formfields * @package Formfields
* *
*/ */
return array( return array(
'emails_addaccount' => array( 'emails_addaccount' => array(
'title' => $lng['emails']['account_add'], 'title' => $lng['emails']['account_add'],
@@ -38,7 +37,7 @@ return array(
'label' => $lng['customer']['generated_pwd'], 'label' => $lng['customer']['generated_pwd'],
'type' => 'text', 'type' => 'text',
'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''), 'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''),
'value' => \Froxlor\System\Crypt::generatePassword(), 'value' => \Froxlor\System\Crypt::generatePassword()
), ),
'email_quota' => array( 'email_quota' => array(
'visible' => (\Froxlor\Settings::Get('system.mail_quota_enabled') == '1' ? true : false), 'visible' => (\Froxlor\Settings::Get('system.mail_quota_enabled') == '1' ? true : false),

View File

@@ -14,7 +14,6 @@
* @package Formfields * @package Formfields
* *
*/ */
return array( return array(
'emails_addforwarder' => array( 'emails_addforwarder' => array(
'title' => $lng['emails']['forwarder_add'], 'title' => $lng['emails']['forwarder_add'],

View File

@@ -14,7 +14,6 @@
* @package Formfields * @package Formfields
* *
*/ */
return array( return array(
'emails_edit' => array( 'emails_edit' => array(
'title' => $lng['emails']['emails_edit'], 'title' => $lng['emails']['emails_edit'],

View File

@@ -44,7 +44,9 @@ return array(
'value' => '1' 'value' => '1'
) )
), ),
'value' => array('1') 'value' => array(
'1'
)
), ),
'backup_mail' => array( 'backup_mail' => array(
'label' => $lng['extras']['backup_mail'], 'label' => $lng['extras']['backup_mail'],
@@ -55,7 +57,9 @@ return array(
'value' => '1' 'value' => '1'
) )
), ),
'value' => array('1') 'value' => array(
'1'
)
), ),
'backup_dbs' => array( 'backup_dbs' => array(
'label' => $lng['extras']['backup_dbs'], 'label' => $lng['extras']['backup_dbs'],
@@ -66,7 +70,9 @@ return array(
'value' => '1' 'value' => '1'
) )
), ),
'value' => array('1') 'value' => array(
'1'
)
) )
) )
) )

View File

@@ -14,7 +14,6 @@
* @package Formfields * @package Formfields
* *
*/ */
return array( return array(
'htaccess_add' => array( 'htaccess_add' => array(
'title' => $lng['extras']['pathoptions_add'], 'title' => $lng['extras']['pathoptions_add'],
@@ -35,7 +34,10 @@ return array(
'label' => $lng['extras']['directory_browsing'], 'label' => $lng['extras']['directory_browsing'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1') array(
'label' => $lng['panel']['yes'],
'value' => '1'
)
), ),
'value' => array() 'value' => array()
), ),
@@ -61,7 +63,10 @@ return array(
'label' => $lng['extras']['execute_perl'], 'label' => $lng['extras']['execute_perl'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1') array(
'label' => $lng['panel']['yes'],
'value' => '1'
)
), ),
'value' => array() 'value' => array()
) )

View File

@@ -14,7 +14,6 @@
* @package Formfields * @package Formfields
* *
*/ */
return array( return array(
'htaccess_edit' => array( 'htaccess_edit' => array(
'title' => $lng['extras']['pathoptions_edit'], 'title' => $lng['extras']['pathoptions_edit'],
@@ -33,9 +32,14 @@ return array(
'label' => $lng['extras']['directory_browsing'], 'label' => $lng['extras']['directory_browsing'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1') array(
'label' => $lng['panel']['yes'],
'value' => '1'
)
), ),
'value' => array($result['options_indexes']) 'value' => array(
$result['options_indexes']
)
), ),
'error404path' => array( 'error404path' => array(
'label' => $lng['extras']['errordocument404path'], 'label' => $lng['extras']['errordocument404path'],
@@ -62,9 +66,14 @@ return array(
'label' => $lng['extras']['execute_perl'], 'label' => $lng['extras']['execute_perl'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1') array(
'label' => $lng['panel']['yes'],
'value' => '1'
)
), ),
'value' => array($result['options_cgi']) 'value' => array(
$result['options_cgi']
)
) )
) )
) )

View File

@@ -14,7 +14,6 @@
* @package Formfields * @package Formfields
* *
*/ */
return array( return array(
'htpasswd_add' => array( 'htpasswd_add' => array(
'title' => $lng['extras']['directoryprotection_add'], 'title' => $lng['extras']['directoryprotection_add'],
@@ -44,7 +43,7 @@ return array(
'label' => $lng['customer']['generated_pwd'], 'label' => $lng['customer']['generated_pwd'],
'type' => 'text', 'type' => 'text',
'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''), 'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''),
'value' => \Froxlor\System\Crypt::generatePassword(), 'value' => \Froxlor\System\Crypt::generatePassword()
), ),
'directory_authname' => array( 'directory_authname' => array(
'label' => $lng['extras']['htpasswdauthname'], 'label' => $lng['extras']['htpasswdauthname'],

View File

@@ -14,7 +14,6 @@
* @package Formfields * @package Formfields
* *
*/ */
return array( return array(
'htpasswd_edit' => array( 'htpasswd_edit' => array(
'title' => $lng['extras']['directoryprotection_edit'], 'title' => $lng['extras']['directoryprotection_edit'],
@@ -43,7 +42,7 @@ return array(
'label' => $lng['customer']['generated_pwd'], 'label' => $lng['customer']['generated_pwd'],
'type' => 'text', 'type' => 'text',
'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''), 'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''),
'value' => \Froxlor\System\Crypt::generatePassword(), 'value' => \Froxlor\System\Crypt::generatePassword()
), ),
'directory_authname' => array( 'directory_authname' => array(
'label' => $lng['extras']['htpasswdauthname'], 'label' => $lng['extras']['htpasswdauthname'],

Some files were not shown because too many files have changed in this diff Show More