major refactoring of almost all files

This commit is contained in:
envoyr
2022-04-28 20:48:00 +02:00
parent a2e95b960f
commit 4f4c71d79b
285 changed files with 21716 additions and 18766 deletions

View File

@@ -4,207 +4,216 @@
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
use Froxlor\Settings;
use Froxlor\System\Crypt;
return array(
'admin_add' => array(
'title' => $lng['admin']['admin_add'],
return [
'admin_add' => [
'title' => lng('admin.admin_add'),
'image' => 'fa-solid fa-user-plus',
'self_overview' => ['section' => 'admins', 'page' => 'admins'],
'sections' => array(
'section_a' => array(
'title' => $lng['admin']['accountdata'],
'sections' => [
'section_a' => [
'title' => lng('admin.accountdata'),
'image' => 'icons/user_add.png',
'fields' => array(
'new_loginname' => array(
'label' => $lng['login']['username'],
'fields' => [
'new_loginname' => [
'label' => lng('login.username'),
'type' => 'text',
'mandatory' => true
),
'admin_password' => array(
'label' => $lng['login']['password'],
],
'admin_password' => [
'label' => lng('login.password'),
'type' => 'password',
'mandatory' => true,
'autocomplete' => 'off',
'next_to' => [
'admin_password_suggestion' => array(
'next_to_prefix' => $lng['customer']['generated_pwd'].':',
'admin_password_suggestion' => [
'next_to_prefix' => lng('customer.generated_pwd') . ':',
'type' => 'text',
'visible' => (Settings::Get('panel.password_regex') == ''),
'value' => \Froxlor\System\Crypt::generatePassword(),
'value' => Crypt::generatePassword(),
'readonly' => true
)
]
]
),
'def_language' => array(
'label' => $lng['login']['language'],
],
'def_language' => [
'label' => lng('login.language'),
'type' => 'select',
'select_var' => $languages,
'selected' => $userinfo['language']
),
'api_allowed' => array(
'label' => $lng['usersettings']['api_allowed']['title'],
'desc' => $lng['usersettings']['api_allowed']['description'],
],
'api_allowed' => [
'label' => lng('usersettings.api_allowed.title'),
'desc' => lng('usersettings.api_allowed.description'),
'type' => 'checkbox',
'value' => '1',
'checked' => Settings::Get('api.enabled') == '1',
'visible' => Settings::Get('api.enabled') == '1'
)
)
),
'section_b' => array(
'title' => $lng['admin']['contactdata'],
]
]
],
'section_b' => [
'title' => lng('admin.contactdata'),
'image' => 'icons/user_add.png',
'fields' => array(
'name' => array(
'label' => $lng['customer']['name'],
'fields' => [
'name' => [
'label' => lng('customer.name'),
'type' => 'text',
'mandatory' => true
),
'email' => array(
'label' => $lng['customer']['email'],
],
'email' => [
'label' => lng('customer.email'),
'type' => 'text',
'mandatory' => true
),
'custom_notes' => array(
'label' => $lng['usersettings']['custom_notes']['title'],
'desc' => $lng['usersettings']['custom_notes']['description'],
],
'custom_notes' => [
'label' => lng('usersettings.custom_notes.title'),
'desc' => lng('usersettings.custom_notes.description'),
'type' => 'textarea',
'cols' => 60,
'rows' => 12
),
'custom_notes_show' => array(
'label' => $lng['usersettings']['custom_notes']['show'],
],
'custom_notes_show' => [
'label' => lng('usersettings.custom_notes.show'),
'type' => 'checkbox',
'value' => '1',
'checked' => false
)
)
),
'section_c' => array(
'title' => $lng['admin']['servicedata'],
]
]
],
'section_c' => [
'title' => lng('admin.servicedata'),
'image' => 'icons/user_add.png',
'fields' => array(
'ipaddress' => array(
'label' => $lng['serversettings']['ipaddress']['title'],
'fields' => [
'ipaddress' => [
'label' => lng('serversettings.ipaddress.title'),
'type' => 'select',
'select_var' => $ipaddress
),
'change_serversettings' => array(
'label' => $lng['admin']['change_serversettings'],
],
'change_serversettings' => [
'label' => lng('admin.change_serversettings'),
'type' => 'checkbox',
'value' => '1',
'checked' => false
),
'customers' => array(
'label' => $lng['admin']['customers'],
],
'customers' => [
'label' => lng('admin.customers'),
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'mandatory' => true
),
'customers_see_all' => array(
'label' => $lng['admin']['customers_see_all'],
],
'customers_see_all' => [
'label' => lng('admin.customers_see_all'),
'type' => 'checkbox',
'value' => '1',
'checked' => false
),
'domains' => array(
'label' => $lng['admin']['domains'],
],
'domains' => [
'label' => lng('admin.domains'),
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'mandatory' => true
),
'domains_see_all' => array(
'label' => $lng['admin']['domains_see_all'],
],
'domains_see_all' => [
'label' => lng('admin.domains_see_all'),
'type' => 'checkbox',
'value' => '1',
'checked' => false
),
'caneditphpsettings' => array(
'label' => $lng['admin']['caneditphpsettings'],
],
'caneditphpsettings' => [
'label' => lng('admin.caneditphpsettings'),
'type' => 'checkbox',
'value' => '1',
'checked' => false
),
'diskspace' => array(
'label' => $lng['customer']['diskspace'] . ' (' . $lng['customer']['mib'] . ')',
],
'diskspace' => [
'label' => lng('customer.diskspace') . ' (' . lng('customer.mib') . ')',
'type' => 'textul',
'value' => 0,
'maxlength' => 6,
'mandatory' => true
),
'traffic' => array(
'label' => $lng['customer']['traffic'] . ' (' . $lng['customer']['gib'] . ')',
],
'traffic' => [
'label' => lng('customer.traffic') . ' (' . lng('customer.gib') . ')',
'type' => 'textul',
'value' => 0,
'maxlength' => 4,
'mandatory' => true
),
'subdomains' => array(
'label' => $lng['customer']['subdomains'],
],
'subdomains' => [
'label' => lng('customer.subdomains'),
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'mandatory' => true
),
'emails' => array(
'label' => $lng['customer']['emails'],
],
'emails' => [
'label' => lng('customer.emails'),
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'mandatory' => true
),
'email_accounts' => array(
'label' => $lng['customer']['accounts'],
],
'email_accounts' => [
'label' => lng('customer.accounts'),
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'mandatory' => true
),
'email_forwarders' => array(
'label' => $lng['customer']['forwarders'],
],
'email_forwarders' => [
'label' => lng('customer.forwarders'),
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'mandatory' => true
),
'email_quota' => array(
'label' => $lng['customer']['email_quota'] . ' (' . $lng['customer']['mib'] . ')',
],
'email_quota' => [
'label' => lng('customer.email_quota') . ' (' . lng('customer.mib') . ')',
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'visible' => Settings::Get('system.mail_quota_enabled') == '1',
'mandatory' => true
),
'ftps' => array(
'label' => $lng['customer']['ftps'],
],
'ftps' => [
'label' => lng('customer.ftps'),
'type' => 'textul',
'value' => 0,
'maxlength' => 9
),
'mysqls' => array(
'label' => $lng['customer']['mysqls'],
],
'mysqls' => [
'label' => lng('customer.mysqls'),
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'mandatory' => true
)
)
)
)
)
);
]
]
]
]
]
];

View File

@@ -4,216 +4,228 @@
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
return array(
'admin_edit' => array(
'title' => $lng['admin']['admin_edit'],
use Froxlor\Settings;
use Froxlor\System\Crypt;
return [
'admin_edit' => [
'title' => lng('admin.admin_edit'),
'image' => 'fa-solid fa-user-pen',
'self_overview' => ['section' => 'admins', 'page' => 'admins'],
'sections' => array(
'section_a' => array(
'title' => $lng['admin']['accountdata'],
'sections' => [
'section_a' => [
'title' => lng('admin.accountdata'),
'image' => 'icons/user_edit.png',
'fields' => array(
'loginname' => array(
'label' => $lng['login']['username'],
'fields' => [
'loginname' => [
'label' => lng('login.username'),
'type' => 'label',
'value' => $result['loginname']
),
'deactivated' => array(
'label' => $lng['admin']['deactivated_user'],
],
'deactivated' => [
'label' => lng('admin.deactivated_user'),
'type' => 'checkbox',
'value' => '1',
'checked' => $result['deactivated'],
'visible' => $result['adminid'] != $userinfo['userid']
),
'admin_password' => array(
'label' => $lng['login']['password'] . '&nbsp;(' . $lng['panel']['emptyfornochanges'] . ')',
],
'admin_password' => [
'label' => lng('login.password') . '&nbsp;(' . lng('panel.emptyfornochanges') . ')',
'type' => 'password',
'autocomplete' => 'off',
'visible' => $result['adminid'] != $userinfo['userid'],
'next_to' => [
'admin_password_suggestion' => array(
'next_to_prefix' => $lng['customer']['generated_pwd'].':',
'admin_password_suggestion' => [
'next_to_prefix' => lng('customer.generated_pwd') . ':',
'type' => 'text',
'visible' => (\Froxlor\Settings::Get('panel.password_regex') == '' && !($result['adminid'] == $userinfo['userid'])),
'value' => \Froxlor\System\Crypt::generatePassword(),
'visible' => (Settings::Get('panel.password_regex') == '' && !($result['adminid'] == $userinfo['userid'])),
'value' => Crypt::generatePassword(),
'readonly' => true
)
]
]
),
'def_language' => array(
'label' => $lng['login']['language'],
],
'def_language' => [
'label' => lng('login.language'),
'type' => 'select',
'select_var' => $languages,
'selected' => $result['def_language'],
'visible' => $result['adminid'] != $userinfo['userid']
),
'api_allowed' => array(
'label' => $lng['usersettings']['api_allowed']['title'],
'desc' => $lng['usersettings']['api_allowed']['description'],
],
'api_allowed' => [
'label' => lng('usersettings.api_allowed.title'),
'desc' => lng('usersettings.api_allowed.description'),
'type' => 'checkbox',
'value' => '1',
'checked' => $result['api_allowed'],
'visible' => \Froxlor\Settings::Get('api.enabled') == '1'
)
)
),
'section_b' => array(
'title' => $lng['admin']['contactdata'],
'visible' => Settings::Get('api.enabled') == '1'
]
]
],
'section_b' => [
'title' => lng('admin.contactdata'),
'image' => 'icons/user_edit.png',
'fields' => array(
'name' => array(
'label' => $lng['customer']['name'],
'fields' => [
'name' => [
'label' => lng('customer.name'),
'type' => 'text',
'mandatory' => true,
'value' => $result['name']
),
'email' => array(
'label' => $lng['customer']['email'],
],
'email' => [
'label' => lng('customer.email'),
'type' => 'text',
'mandatory' => true,
'value' => $result['email']
),
'custom_notes' => array(
'label' => $lng['usersettings']['custom_notes']['title'],
'desc' => $lng['usersettings']['custom_notes']['description'],
],
'custom_notes' => [
'label' => lng('usersettings.custom_notes.title'),
'desc' => lng('usersettings.custom_notes.description'),
'type' => 'textarea',
'cols' => 60,
'rows' => 12,
'value' => $result['custom_notes']
),
'custom_notes_show' => array(
'label' => $lng['usersettings']['custom_notes']['show'],
],
'custom_notes_show' => [
'label' => lng('usersettings.custom_notes.show'),
'type' => 'checkbox',
'value' => '1',
'checked' => $result['custom_notes_show']
)
)
),
'section_c' => array(
'title' => $lng['admin']['servicedata'],
]
]
],
'section_c' => [
'title' => lng('admin.servicedata'),
'image' => 'icons/user_add.png',
'visible' => $result['adminid'] != $userinfo['userid'],
'fields' => array(
'ipaddress' => array(
'label' => $lng['serversettings']['ipaddress']['title'],
'fields' => [
'ipaddress' => [
'label' => lng('serversettings.ipaddress.title'),
'type' => 'select',
'select_var' => $ipaddress,
'selected' => $result['ip']
),
'change_serversettings' => array(
'label' => $lng['admin']['change_serversettings'],
],
'change_serversettings' => [
'label' => lng('admin.change_serversettings'),
'type' => 'checkbox',
'value' => '1',
'checked' => $result['change_serversettings']
),
'customers' => array(
'label' => $lng['admin']['customers'],
],
'customers' => [
'label' => lng('admin.customers'),
'type' => 'textul',
'value' => $result['customers'],
'maxlength' => 9,
'mandatory' => true
),
'customers_see_all' => array(
'label' => $lng['admin']['customers_see_all'],
],
'customers_see_all' => [
'label' => lng('admin.customers_see_all'),
'type' => 'checkbox',
'value' => '1',
'checked' => $result['customers_see_all']
),
'domains' => array(
'label' => $lng['admin']['domains'],
],
'domains' => [
'label' => lng('admin.domains'),
'type' => 'textul',
'value' => $result['domains'],
'maxlength' => 9,
'mandatory' => true
),
'domains_see_all' => array(
'label' => $lng['admin']['domains_see_all'],
],
'domains_see_all' => [
'label' => lng('admin.domains_see_all'),
'type' => 'checkbox',
'value' => '1',
'checked' => $result['domains_see_all']
),
'caneditphpsettings' => array(
'label' => $lng['admin']['caneditphpsettings'],
],
'caneditphpsettings' => [
'label' => lng('admin.caneditphpsettings'),
'type' => 'checkbox',
'value' => '1',
'checked' => $result['caneditphpsettings']
),
'diskspace' => array(
'label' => $lng['customer']['diskspace'] . ' (' . $lng['customer']['mib'] . ')',
],
'diskspace' => [
'label' => lng('customer.diskspace') . ' (' . lng('customer.mib') . ')',
'type' => 'textul',
'value' => $result['diskspace'],
'maxlength' => 6,
'mandatory' => true
),
'traffic' => array(
'label' => $lng['customer']['traffic'] . ' (' . $lng['customer']['gib'] . ')',
],
'traffic' => [
'label' => lng('customer.traffic') . ' (' . lng('customer.gib') . ')',
'type' => 'textul',
'value' => $result['traffic'],
'maxlength' => 4,
'mandatory' => true
),
'subdomains' => array(
'label' => $lng['customer']['subdomains'],
],
'subdomains' => [
'label' => lng('customer.subdomains'),
'type' => 'textul',
'value' => $result['subdomains'],
'maxlength' => 9,
'mandatory' => true
),
'emails' => array(
'label' => $lng['customer']['emails'],
],
'emails' => [
'label' => lng('customer.emails'),
'type' => 'textul',
'value' => $result['emails'],
'maxlength' => 9,
'mandatory' => true
),
'email_accounts' => array(
'label' => $lng['customer']['accounts'],
],
'email_accounts' => [
'label' => lng('customer.accounts'),
'type' => 'textul',
'value' => $result['email_accounts'],
'maxlength' => 9,
'mandatory' => true
),
'email_forwarders' => array(
'label' => $lng['customer']['forwarders'],
],
'email_forwarders' => [
'label' => lng('customer.forwarders'),
'type' => 'textul',
'value' => $result['email_forwarders'],
'maxlength' => 9,
'mandatory' => true
),
'email_quota' => array(
'label' => $lng['customer']['email_quota'] . ' (' . $lng['customer']['mib'] . ')',
],
'email_quota' => [
'label' => lng('customer.email_quota') . ' (' . lng('customer.mib') . ')',
'type' => 'textul',
'value' => $result['email_quota'],
'maxlength' => 9,
'visible' => \Froxlor\Settings::Get('system.mail_quota_enabled') == '1',
'visible' => Settings::Get('system.mail_quota_enabled') == '1',
'mandatory' => true
),
'ftps' => array(
'label' => $lng['customer']['ftps'],
],
'ftps' => [
'label' => lng('customer.ftps'),
'type' => 'textul',
'value' => $result['ftps'],
'maxlength' => 9
),
'mysqls' => array(
'label' => $lng['customer']['mysqls'],
],
'mysqls' => [
'label' => lng('customer.mysqls'),
'type' => 'textul',
'value' => $result['mysqls'],
'maxlength' => 9,
'mandatory' => true
)
)
)
)
)
);
]
]
]
]
]
];

View File

@@ -4,55 +4,64 @@
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
return array(
'cronjobs_edit' => array(
'title' => $lng['admin']['cronjob_edit'],
return [
'cronjobs_edit' => [
'title' => lng('admin.cronjob_edit'),
'image' => 'fa-solid fa-clock-rotate-left',
'sections' => array(
'section_a' => array(
'title' => $lng['cronjob']['cronjobsettings'],
'sections' => [
'section_a' => [
'title' => lng('cronjob.cronjobsettings'),
'image' => 'icons/clock_edit.png',
'fields' => array(
'cronfile' => array(
'fields' => [
'cronfile' => [
'label' => 'Cronjob',
'type' => (substr($result['module'], 0, strpos($result['module'], '/')) != 'froxlor' ? 'text' : 'label'),
'value' => $result['cronfile']
),
'isactive' => array(
'label' => $lng['admin']['activated'],
],
'isactive' => [
'label' => lng('admin.activated'),
'type' => 'checkbox',
'value' => '1',
'checked' => $result['isactive']
),
'interval_value' => array(
'label' => $lng['cronjob']['cronjobintervalv'],
],
'interval_value' => [
'label' => lng('cronjob.cronjobintervalv'),
'type' => 'text',
'value' => explode(' ', $result['interval'] ?? "5 MINUTE")[0] ?? ""
),
'interval_interval' => array(
'label' => $lng['cronjob']['cronjobinterval'],
],
'interval_interval' => [
'label' => lng('cronjob.cronjobinterval'),
'type' => 'select',
'select_var' => [
'MINUTE' => $lng['cronmgmt']['minutes'],
'HOUR' => $lng['cronmgmt']['hours'],
'DAY' => $lng['cronmgmt']['days'],
'WEEK' => $lng['cronmgmt']['weeks'],
'MONTH' => $lng['cronmgmt']['months']
'MINUTE' => lng('cronmgmt.minutes'),
'HOUR' => lng('cronmgmt.hours'),
'DAY' => lng('cronmgmt.days'),
'WEEK' => lng('cronmgmt.weeks'),
'MONTH' => lng('cronmgmt.months')
],
'selected' => explode(' ', $result['interval'] ?? "5 MINUTE")[1] ?? null
)
)
)
)
)
);
]
]
]
]
]
];

View File

@@ -4,285 +4,297 @@
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
return array(
'customer_add' => array(
'title' => $lng['admin']['customer_add'],
use Froxlor\Settings;
use Froxlor\System\Crypt;
return [
'customer_add' => [
'title' => lng('admin.customer_add'),
'image' => 'fa-solid fa-user-plus',
'self_overview' => ['section' => 'customers', 'page' => 'customers'],
'sections' => array(
'section_a' => array(
'title' => $lng['admin']['accountdata'],
'sections' => [
'section_a' => [
'title' => lng('admin.accountdata'),
'image' => 'icons/user_add.png',
'fields' => array(
'new_loginname' => array(
'label' => $lng['login']['username'],
'fields' => [
'new_loginname' => [
'label' => lng('login.username'),
'type' => 'text',
'placeholder' => 'Leave empty for autogenerated value'
),
'createstdsubdomain' => array(
'label' => $lng['admin']['stdsubdomain_add'] . '?',
],
'createstdsubdomain' => [
'label' => lng('admin.stdsubdomain_add') . '?',
'type' => 'checkbox',
'value' => '1',
'checked' => \Froxlor\Settings::Get('system.createstdsubdom_default')
),
'store_defaultindex' => array(
'label' => $lng['admin']['store_defaultindex'] . '?',
'checked' => Settings::Get('system.createstdsubdom_default')
],
'store_defaultindex' => [
'label' => lng('admin.store_defaultindex') . '?',
'type' => 'checkbox',
'value' => '1',
'checked' => true
),
'new_customer_password' => array(
'label' => $lng['login']['password'],
],
'new_customer_password' => [
'label' => lng('login.password'),
'type' => 'password',
'autocomplete' => 'off',
'next_to' => [
'new_customer_password_suggestion' => array(
'next_to_prefix' => $lng['customer']['generated_pwd'].':',
'new_customer_password_suggestion' => [
'next_to_prefix' => lng('customer.generated_pwd') . ':',
'type' => 'text',
'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''),
'value' => \Froxlor\System\Crypt::generatePassword(),
'visible' => (Settings::Get('panel.password_regex') == ''),
'value' => Crypt::generatePassword(),
'readonly' => true
)
]
]
),
'sendpassword' => array(
'label' => $lng['admin']['sendpassword'],
],
'sendpassword' => [
'label' => lng('admin.sendpassword'),
'type' => 'checkbox',
'value' => '1',
'checked' => true
),
'def_language' => array(
'label' => $lng['login']['language'],
],
'def_language' => [
'label' => lng('login.language'),
'type' => 'select',
'select_var' => $languages,
'selected' => \Froxlor\Settings::Get('panel.standardlanguage')
),
'api_allowed' => array(
'label' => $lng['usersettings']['api_allowed']['title'],
'desc' => $lng['usersettings']['api_allowed']['description'],
'selected' => Settings::Get('panel.standardlanguage')
],
'api_allowed' => [
'label' => lng('usersettings.api_allowed.title'),
'desc' => lng('usersettings.api_allowed.description'),
'type' => 'checkbox',
'value' => '1',
'checked' => \Froxlor\Settings::Get('api.enabled') == '1',
'visible' => \Froxlor\Settings::Get('api.enabled') == '1'
)
)
),
'section_b' => array(
'title' => $lng['admin']['contactdata'],
'checked' => Settings::Get('api.enabled') == '1',
'visible' => Settings::Get('api.enabled') == '1'
]
]
],
'section_b' => [
'title' => lng('admin.contactdata'),
'image' => 'icons/user_add.png',
'fields' => array(
'name' => array(
'label' => $lng['customer']['name'],
'fields' => [
'name' => [
'label' => lng('customer.name'),
'type' => 'text',
'mandatory_ex' => true
),
'firstname' => array(
'label' => $lng['customer']['firstname'],
],
'firstname' => [
'label' => lng('customer.firstname'),
'type' => 'text',
'mandatory_ex' => true
),
'gender' => array(
'label' => $lng['gender']['title'],
],
'gender' => [
'label' => lng('gender.title'),
'type' => 'select',
'select_var' => [
0 => $lng['gender']['undef'],
1 => $lng['gender']['male'],
2 => $lng['gender']['female']
0 => lng('gender.undef'),
1 => lng('gender.male'),
2 => lng('gender.female')
]
),
'company' => array(
'label' => $lng['customer']['company'],
],
'company' => [
'label' => lng('customer.company'),
'type' => 'text',
'mandatory_ex' => true
),
'street' => array(
'label' => $lng['customer']['street'],
],
'street' => [
'label' => lng('customer.street'),
'type' => 'text'
),
'zipcode' => array(
'label' => $lng['customer']['zipcode'] . ' / ' . $lng['customer']['city'],
],
'zipcode' => [
'label' => lng('customer.zipcode') . ' / ' . lng('customer.city'),
'type' => 'text',
'next_to' => [
'city' => array(
'city' => [
'next_to_prefix' => ' / ',
'type' => 'text'
)
]
]
),
'phone' => array(
'label' => $lng['customer']['phone'],
],
'phone' => [
'label' => lng('customer.phone'),
'type' => 'text'
),
'fax' => array(
'label' => $lng['customer']['fax'],
],
'fax' => [
'label' => lng('customer.fax'),
'type' => 'text'
),
'email' => array(
'label' => $lng['customer']['email'],
],
'email' => [
'label' => lng('customer.email'),
'type' => 'text',
'mandatory' => true
),
'customernumber' => array(
'label' => $lng['customer']['customernumber'],
],
'customernumber' => [
'label' => lng('customer.customernumber'),
'type' => 'text'
),
'custom_notes' => array(
'label' => $lng['usersettings']['custom_notes']['title'],
'desc' => $lng['usersettings']['custom_notes']['description'],
],
'custom_notes' => [
'label' => lng('usersettings.custom_notes.title'),
'desc' => lng('usersettings.custom_notes.description'),
'type' => 'textarea',
'cols' => 60,
'rows' => 12
),
'custom_notes_show' => array(
'label' => $lng['usersettings']['custom_notes']['show'],
],
'custom_notes_show' => [
'label' => lng('usersettings.custom_notes.show'),
'type' => 'checkbox',
'value' => '1',
'checked' => false
)
)
),
'section_cpre' => array(
]
]
],
'section_cpre' => [
'visible' => !empty($hosting_plans),
'title' => $lng['admin']['plans']['use_plan'],
'title' => lng('admin.plans.use_plan'),
'image' => 'icons/user_add.png',
'fields' => array(
'use_plan' => array(
'label' => $lng['admin']['plans']['use_plan'],
'fields' => [
'use_plan' => [
'label' => lng('admin.plans.use_plan'),
'type' => 'select',
'select_var' => $hosting_plans
)
)
),
'section_c' => array(
'title' => $lng['admin']['servicedata'],
]
]
],
'section_c' => [
'title' => lng('admin.servicedata'),
'image' => 'icons/user_add.png',
'fields' => array(
'diskspace' => array(
'label' => $lng['customer']['diskspace'] . ' (' . $lng['customer']['mib'] . ')',
'fields' => [
'diskspace' => [
'label' => lng('customer.diskspace') . ' (' . lng('customer.mib') . ')',
'type' => 'textul',
'value' => 0,
'maxlength' => 16,
'mandatory' => true
),
'traffic' => array(
'label' => $lng['customer']['traffic'] . ' (' . $lng['customer']['gib'] . ')',
],
'traffic' => [
'label' => lng('customer.traffic') . ' (' . lng('customer.gib') . ')',
'type' => 'textul',
'value' => 0,
'maxlength' => 14,
'mandatory' => true
),
'subdomains' => array(
'label' => $lng['customer']['subdomains'],
],
'subdomains' => [
'label' => lng('customer.subdomains'),
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'mandatory' => true
),
'emails' => array(
'label' => $lng['customer']['emails'],
],
'emails' => [
'label' => lng('customer.emails'),
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'mandatory' => true
),
'email_accounts' => array(
'label' => $lng['customer']['accounts'],
],
'email_accounts' => [
'label' => lng('customer.accounts'),
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'mandatory' => true
),
'email_forwarders' => array(
'label' => $lng['customer']['forwarders'],
],
'email_forwarders' => [
'label' => lng('customer.forwarders'),
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'mandatory' => true
),
'email_quota' => array(
'label' => $lng['customer']['email_quota'] . ' (' . $lng['customer']['mib'] . ')',
],
'email_quota' => [
'label' => lng('customer.email_quota') . ' (' . lng('customer.mib') . ')',
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'visible' => \Froxlor\Settings::Get('system.mail_quota_enabled') == '1',
'visible' => Settings::Get('system.mail_quota_enabled') == '1',
'mandatory' => true
),
'email_imap' => array(
'label' => $lng['customer']['email_imap'],
],
'email_imap' => [
'label' => lng('customer.email_imap'),
'type' => 'checkbox',
'value' => '1',
'checked' => true,
'mandatory' => true
),
'email_pop3' => array(
'label' => $lng['customer']['email_pop3'],
],
'email_pop3' => [
'label' => lng('customer.email_pop3'),
'type' => 'checkbox',
'value' => '1',
'checked' => true,
'mandatory' => true
),
'ftps' => array(
'label' => $lng['customer']['ftps'],
],
'ftps' => [
'label' => lng('customer.ftps'),
'type' => 'textul',
'value' => 0,
'maxlength' => 9
),
'mysqls' => array(
'label' => $lng['customer']['mysqls'],
],
'mysqls' => [
'label' => lng('customer.mysqls'),
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'mandatory' => true
),
'phpenabled' => array(
'label' => $lng['admin']['phpenabled'] . '?',
],
'phpenabled' => [
'label' => lng('admin.phpenabled') . '?',
'type' => 'checkbox',
'value' => '1',
'checked' => true
),
'allowed_phpconfigs' => array(
'visible' => (((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 || (int) \Froxlor\Settings::Get('phpfpm.enabled') == 1)),
'label' => $lng['admin']['phpsettings']['title'],
],
'allowed_phpconfigs' => [
'visible' => (((int)Settings::Get('system.mod_fcgid') == 1 || (int)Settings::Get('phpfpm.enabled') == 1)),
'label' => lng('admin.phpsettings.title'),
'type' => 'checkbox',
'values' => $phpconfigs,
'value' => ((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 ?
[\Froxlor\Settings::Get('system.mod_fcgid_defaultini')]
: ((int) \Froxlor\Settings::Get('phpfpm.enabled') == 1 ?
[\Froxlor\Settings::Get('phpfpm.defaultini')]
'value' => ((int)Settings::Get('system.mod_fcgid') == 1 ?
[Settings::Get('system.mod_fcgid_defaultini')]
: ((int)Settings::Get('phpfpm.enabled') == 1 ?
[Settings::Get('phpfpm.defaultini')]
: null)),
'is_array' => 1
),
'perlenabled' => array(
'label' => $lng['admin']['perlenabled'] . '?',
],
'perlenabled' => [
'label' => lng('admin.perlenabled') . '?',
'type' => 'checkbox',
'value' => '1',
'checked' => false
),
'dnsenabled' => array(
'label' => $lng['admin']['dnsenabled'] . '?',
],
'dnsenabled' => [
'label' => lng('admin.dnsenabled') . '?',
'type' => 'checkbox',
'value' => '1',
'checked' => \Froxlor\Settings::Get('system.dnsenabled') == '1',
'visible' => \Froxlor\Settings::Get('system.dnsenabled') == '1'
),
'logviewenabled' => array(
'label' => $lng['admin']['logviewenabled'] . '?',
'checked' => Settings::Get('system.dnsenabled') == '1',
'visible' => Settings::Get('system.dnsenabled') == '1'
],
'logviewenabled' => [
'label' => lng('admin.logviewenabled') . '?',
'type' => 'checkbox',
'value' => '1',
'checked' => true
)
)
)
)
)
);
]
]
]
]
]
];

View File

@@ -4,305 +4,317 @@
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
return array(
'customer_edit' => array(
'title' => $lng['admin']['customer_edit'],
use Froxlor\Settings;
use Froxlor\System\Crypt;
return [
'customer_edit' => [
'title' => lng('admin.customer_edit'),
'image' => 'fa-solid fa-user-pen',
'self_overview' => ['section' => 'customers', 'page' => 'customers'],
'sections' => array(
'section_a' => array(
'title' => $lng['admin']['accountdata'],
'sections' => [
'section_a' => [
'title' => lng('admin.accountdata'),
'image' => 'icons/user_edit.png',
'fields' => array(
'loginname' => array(
'label' => $lng['login']['username'],
'fields' => [
'loginname' => [
'label' => lng('login.username'),
'type' => 'label',
'value' => $result['loginname']
),
'documentroot' => array(
'label' => $lng['customer']['documentroot'],
],
'documentroot' => [
'label' => lng('customer.documentroot'),
'type' => 'label',
'value' => $result['documentroot']
),
'createstdsubdomain' => array(
'label' => $lng['admin']['stdsubdomain_add'] . '?',
],
'createstdsubdomain' => [
'label' => lng('admin.stdsubdomain_add') . '?',
'type' => 'checkbox',
'value' => '1',
'checked' => ($result['standardsubdomain'] != '0') ? '1' : '0'
),
'deactivated' => array(
'label' => $lng['admin']['deactivated_user'],
],
'deactivated' => [
'label' => lng('admin.deactivated_user'),
'type' => 'checkbox',
'value' => '1',
'checked' => $result['deactivated']
),
'new_customer_password' => array(
'label' => $lng['login']['password'] . '&nbsp;(' . $lng['panel']['emptyfornochanges'] . ')',
],
'new_customer_password' => [
'label' => lng('login.password') . '&nbsp;(' . lng('panel.emptyfornochanges') . ')',
'type' => 'password',
'autocomplete' => 'off',
'next_to' => [
'new_customer_password_suggestion' => array(
'next_to_prefix' => $lng['customer']['generated_pwd'] . ':',
'new_customer_password_suggestion' => [
'next_to_prefix' => lng('customer.generated_pwd') . ':',
'type' => 'text',
'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''),
'value' => \Froxlor\System\Crypt::generatePassword(),
'visible' => (Settings::Get('panel.password_regex') == ''),
'value' => Crypt::generatePassword(),
'readonly' => true
)
]
]
),
'def_language' => array(
'label' => $lng['login']['language'],
],
'def_language' => [
'label' => lng('login.language'),
'type' => 'select',
'select_var' => $languages,
'selected' => $result['def_language']
),
'api_allowed' => array(
'label' => $lng['usersettings']['api_allowed']['title'],
'desc' => $lng['usersettings']['api_allowed']['description'],
],
'api_allowed' => [
'label' => lng('usersettings.api_allowed.title'),
'desc' => lng('usersettings.api_allowed.description'),
'type' => 'checkbox',
'value' => '1',
'checked' => $result['api_allowed'],
'visible' => \Froxlor\Settings::Get('api.enabled') == '1'
)
)
),
'section_b' => array(
'title' => $lng['admin']['contactdata'],
'visible' => Settings::Get('api.enabled') == '1'
]
]
],
'section_b' => [
'title' => lng('admin.contactdata'),
'image' => 'icons/user_edit.png',
'fields' => array(
'name' => array(
'label' => $lng['customer']['name'],
'fields' => [
'name' => [
'label' => lng('customer.name'),
'type' => 'text',
'mandatory_ex' => true,
'value' => $result['name']
),
'firstname' => array(
'label' => $lng['customer']['firstname'],
],
'firstname' => [
'label' => lng('customer.firstname'),
'type' => 'text',
'mandatory_ex' => true,
'value' => $result['firstname']
),
'gender' => array(
'label' => $lng['gender']['title'],
],
'gender' => [
'label' => lng('gender.title'),
'type' => 'select',
'select_var' => [
0 => $lng['gender']['undef'],
1 => $lng['gender']['male'],
2 => $lng['gender']['female']
0 => lng('gender.undef'),
1 => lng('gender.male'),
2 => lng('gender.female')
],
'selected' => $result['gender']
),
'company' => array(
'label' => $lng['customer']['company'],
],
'company' => [
'label' => lng('customer.company'),
'type' => 'text',
'mandatory_ex' => true,
'value' => $result['company']
),
'street' => array(
'label' => $lng['customer']['street'],
],
'street' => [
'label' => lng('customer.street'),
'type' => 'text',
'value' => $result['street']
),
'zipcode' => array(
'label' => $lng['customer']['zipcode'] . ' / ' . $lng['customer']['city'],
],
'zipcode' => [
'label' => lng('customer.zipcode') . ' / ' . lng('customer.city'),
'type' => 'text',
'value' => $result['zipcode'],
'next_to' => [
'city' => array(
'city' => [
'next_to_prefix' => ' / ',
'type' => 'text',
'value' => $result['city']
)
]
]
),
'phone' => array(
'label' => $lng['customer']['phone'],
],
'phone' => [
'label' => lng('customer.phone'),
'type' => 'text',
'value' => $result['phone']
),
'fax' => array(
'label' => $lng['customer']['fax'],
],
'fax' => [
'label' => lng('customer.fax'),
'type' => 'text',
'value' => $result['fax']
),
'email' => array(
'label' => $lng['customer']['email'],
],
'email' => [
'label' => lng('customer.email'),
'type' => 'text',
'mandatory' => true,
'value' => $result['email']
),
'customernumber' => array(
'label' => $lng['customer']['customernumber'],
],
'customernumber' => [
'label' => lng('customer.customernumber'),
'type' => 'text',
'value' => $result['customernumber']
),
'custom_notes' => array(
],
'custom_notes' => [
'style' => 'align-top',
'label' => $lng['usersettings']['custom_notes']['title'],
'desc' => $lng['usersettings']['custom_notes']['description'],
'label' => lng('usersettings.custom_notes.title'),
'desc' => lng('usersettings.custom_notes.description'),
'type' => 'textarea',
'cols' => 60,
'rows' => 12,
'value' => $result['custom_notes']
),
'custom_notes_show' => array(
'label' => $lng['usersettings']['custom_notes']['show'],
],
'custom_notes_show' => [
'label' => lng('usersettings.custom_notes.show'),
'type' => 'checkbox',
'value' => '1',
'checked' => $result['custom_notes_show']
)
)
),
'section_cpre' => array(
]
]
],
'section_cpre' => [
'visible' => !empty($hosting_plans),
'title' => $lng['admin']['plans']['use_plan'],
'title' => lng('admin.plans.use_plan'),
'image' => 'icons/user_add.png',
'fields' => array(
'use_plan' => array(
'label' => $lng['admin']['plans']['use_plan'],
'fields' => [
'use_plan' => [
'label' => lng('admin.plans.use_plan'),
'type' => 'select',
'select_var' => $hosting_plans
)
)
),
'section_c' => array(
'title' => $lng['admin']['servicedata'],
]
]
],
'section_c' => [
'title' => lng('admin.servicedata'),
'image' => 'icons/user_edit.png',
'fields' => array(
'diskspace' => array(
'label' => $lng['customer']['diskspace'] . ' (' . $lng['customer']['mib'] . ')',
'fields' => [
'diskspace' => [
'label' => lng('customer.diskspace') . ' (' . lng('customer.mib') . ')',
'type' => 'textul',
'value' => $result['diskspace'],
'maxlength' => 16,
'mandatory' => true
),
'traffic' => array(
'label' => $lng['customer']['traffic'] . ' (' . $lng['customer']['gib'] . ')',
],
'traffic' => [
'label' => lng('customer.traffic') . ' (' . lng('customer.gib') . ')',
'type' => 'textul',
'value' => $result['traffic'],
'maxlength' => 14,
'mandatory' => true
),
'subdomains' => array(
'label' => $lng['customer']['subdomains'],
],
'subdomains' => [
'label' => lng('customer.subdomains'),
'type' => 'textul',
'value' => $result['subdomains'],
'maxlength' => 9,
'mandatory' => true
),
'emails' => array(
'label' => $lng['customer']['emails'],
],
'emails' => [
'label' => lng('customer.emails'),
'type' => 'textul',
'value' => $result['emails'],
'maxlength' => 9,
'mandatory' => true
),
'email_accounts' => array(
'label' => $lng['customer']['accounts'],
],
'email_accounts' => [
'label' => lng('customer.accounts'),
'type' => 'textul',
'value' => $result['email_accounts'],
'maxlength' => 9,
'mandatory' => true
),
'email_forwarders' => array(
'label' => $lng['customer']['forwarders'],
],
'email_forwarders' => [
'label' => lng('customer.forwarders'),
'type' => 'textul',
'value' => $result['email_forwarders'],
'maxlength' => 9,
'mandatory' => true
),
'email_quota' => array(
'label' => $lng['customer']['email_quota'] . ' (' . $lng['customer']['mib'] . ')',
],
'email_quota' => [
'label' => lng('customer.email_quota') . ' (' . lng('customer.mib') . ')',
'type' => 'textul',
'value' => $result['email_quota'],
'maxlength' => 9,
'visible' => \Froxlor\Settings::Get('system.mail_quota_enabled') == '1',
'visible' => Settings::Get('system.mail_quota_enabled') == '1',
'mandatory' => true
),
'email_imap' => array(
'label' => $lng['customer']['email_imap'],
],
'email_imap' => [
'label' => lng('customer.email_imap'),
'type' => 'checkbox',
'value' => '1',
'checked' => $result['imap'],
'mandatory' => true
),
'email_pop3' => array(
'label' => $lng['customer']['email_pop3'],
],
'email_pop3' => [
'label' => lng('customer.email_pop3'),
'type' => 'checkbox',
'value' => '1',
'checked' => $result['pop3'],
'mandatory' => true
),
'ftps' => array(
'label' => $lng['customer']['ftps'],
],
'ftps' => [
'label' => lng('customer.ftps'),
'type' => 'textul',
'value' => $result['ftps'],
'maxlength' => 9
),
'mysqls' => array(
'label' => $lng['customer']['mysqls'],
],
'mysqls' => [
'label' => lng('customer.mysqls'),
'type' => 'textul',
'value' => $result['mysqls'],
'maxlength' => 9,
'mandatory' => true
),
'phpenabled' => array(
'label' => $lng['admin']['phpenabled'] . '?',
],
'phpenabled' => [
'label' => lng('admin.phpenabled') . '?',
'type' => 'checkbox',
'value' => '1',
'checked' => $result['phpenabled']
),
'allowed_phpconfigs' => array(
'visible' => (((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 || (int) \Froxlor\Settings::Get('phpfpm.enabled') == 1)),
'label' => $lng['admin']['phpsettings']['title'],
],
'allowed_phpconfigs' => [
'visible' => (((int)Settings::Get('system.mod_fcgid') == 1 || (int)Settings::Get('phpfpm.enabled') == 1)),
'label' => lng('admin.phpsettings.title'),
'type' => 'checkbox',
'values' => $phpconfigs,
'value' => isset($result['allowed_phpconfigs']) && !empty($result['allowed_phpconfigs']) ? json_decode($result['allowed_phpconfigs'], JSON_OBJECT_AS_ARRAY) : array(),
'value' => isset($result['allowed_phpconfigs']) && !empty($result['allowed_phpconfigs']) ? json_decode($result['allowed_phpconfigs'], JSON_OBJECT_AS_ARRAY) : [],
'is_array' => 1
),
'perlenabled' => array(
'label' => $lng['admin']['perlenabled'] . '?',
],
'perlenabled' => [
'label' => lng('admin.perlenabled') . '?',
'type' => 'checkbox',
'value' => '1',
'checked' => $result['perlenabled']
),
'dnsenabled' => array(
'label' => $lng['admin']['dnsenabled'] . '?',
],
'dnsenabled' => [
'label' => lng('admin.dnsenabled') . '?',
'type' => 'checkbox',
'value' => '1',
'checked' => $result['dnsenabled'],
'visible' => \Froxlor\Settings::Get('system.dnsenabled') == '1'
),
'logviewenabled' => array(
'label' => $lng['admin']['logviewenabled'] . '?',
'visible' => Settings::Get('system.dnsenabled') == '1'
],
'logviewenabled' => [
'label' => lng('admin.logviewenabled') . '?',
'type' => 'checkbox',
'value' => '1',
'checked' => $result['logviewenabled']
)
)
),
'section_d' => array(
'title' => $lng['admin']['movetoadmin'],
]
]
],
'section_d' => [
'title' => lng('admin.movetoadmin'),
'image' => 'icons/user_edit.png',
'visible' => count($admin_select) > 0,
'fields' => array(
'move_to_admin' => array(
'label' => $lng['admin']['movecustomertoadmin'],
'fields' => [
'move_to_admin' => [
'label' => lng('admin.movecustomertoadmin'),
'type' => 'select',
'select_var' => $admin_select
)
)
)
)
)
);
]
]
]
]
]
];

View File

@@ -4,398 +4,406 @@
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
use Froxlor\Settings;
return array(
'domain_add' => array(
'title' => $lng['admin']['domain_add'],
return [
'domain_add' => [
'title' => lng('admin.domain_add'),
'image' => 'fa-solid fa-globe',
'self_overview' => ['section' => 'domains', 'page' => 'domains'],
'sections' => array(
'section_a' => array(
'title' => $lng['domains']['domainsettings'],
'sections' => [
'section_a' => [
'title' => lng('domains.domainsettings'),
'image' => 'icons/domain_add.png',
'fields' => array(
'domain' => array(
'fields' => [
'domain' => [
'label' => 'Domain',
'type' => 'text',
'mandatory' => true
),
'customerid' => array(
'label' => $lng['admin']['customer'],
],
'customerid' => [
'label' => lng('admin.customer'),
'type' => 'select',
'select_var' => $customers,
'mandatory' => true
),
'adminid' => array(
],
'adminid' => [
'visible' => $userinfo['customers_see_all'] == '1',
'label' => $lng['admin']['admin'],
'label' => lng('admin.admin'),
'type' => 'select',
'select_var' => $admins,
'selected' => $userinfo['adminid'],
'mandatory' => true
),
'alias' => array(
'label' => $lng['domains']['aliasdomain'],
],
'alias' => [
'label' => lng('domains.aliasdomain'),
'type' => 'select',
'select_var' => $domains
),
'issubof' => array(
'label' => $lng['domains']['issubof'],
'desc' => $lng['domains']['issubofinfo'],
],
'issubof' => [
'label' => lng('domains.issubof'),
'desc' => lng('domains.issubofinfo'),
'type' => 'select',
'select_var' => $subtodomains
),
'caneditdomain' => array(
'label' => $lng['admin']['domain_editable']['title'],
'desc' => $lng['admin']['domain_editable']['desc'],
],
'caneditdomain' => [
'label' => lng('admin.domain_editable.title'),
'desc' => lng('admin.domain_editable.desc'),
'type' => 'checkbox',
'value' => '1',
'checked' => true
),
'add_date' => array(
'label' => $lng['domains']['add_date'],
'desc' => $lng['panel']['dateformat'],
],
'add_date' => [
'label' => lng('domains.add_date'),
'desc' => lng('panel.dateformat'),
'type' => 'label',
'value' => date('Y-m-d')
),
'registration_date' => array(
'label' => $lng['domains']['registration_date'],
'desc' => $lng['panel']['dateformat'],
],
'registration_date' => [
'label' => lng('domains.registration_date'),
'desc' => lng('panel.dateformat'),
'type' => 'text',
'size' => 10
),
'termination_date' => array(
'label' => $lng['domains']['termination_date'],
'desc' => $lng['panel']['dateformat'],
],
'termination_date' => [
'label' => lng('domains.termination_date'),
'desc' => lng('panel.dateformat'),
'type' => 'text',
'size' => 10
)
)
),
'section_e' => array(
'title' => $lng['admin']['mailserversettings'],
]
]
],
'section_e' => [
'title' => lng('admin.mailserversettings'),
'image' => 'icons/domain_add.png',
'fields' => array(
'isemaildomain' => array(
'label' => $lng['admin']['emaildomain'],
'fields' => [
'isemaildomain' => [
'label' => lng('admin.emaildomain'),
'type' => 'checkbox',
'value' => '1',
'checked' => true
),
'email_only' => array(
'label' => $lng['admin']['email_only'],
],
'email_only' => [
'label' => lng('admin.email_only'),
'type' => 'checkbox',
'value' => '1',
'checked' => false
),
'subcanemaildomain' => array(
'label' => $lng['admin']['subdomainforemail'],
],
'subcanemaildomain' => [
'label' => lng('admin.subdomainforemail'),
'type' => 'select',
'select_var' => $subcanemaildomain,
'selected' => 0
),
'dkim' => array(
],
'dkim' => [
'visible' => Settings::Get('dkim.use_dkim') == '1',
'label' => 'DomainKeys',
'type' => 'checkbox',
'value' => '1',
'checked' => true
)
)
),
'section_b' => array(
'title' => $lng['admin']['webserversettings'],
]
]
],
'section_b' => [
'title' => lng('admin.webserversettings'),
'image' => 'icons/domain_add.png',
'fields' => array(
'documentroot' => array(
'fields' => [
'documentroot' => [
'label' => 'DocumentRoot',
'desc' => $lng['panel']['emptyfordefault'],
'desc' => lng('panel.emptyfordefault'),
'type' => 'text'
),
'ipandport' => array(
'label' => $lng['domains']['ipandport_multi']['title'],
'desc' => $lng['domains']['ipandport_multi']['description'],
],
'ipandport' => [
'label' => lng('domains.ipandport_multi.title'),
'desc' => lng('domains.ipandport_multi.description'),
'type' => 'checkbox',
'values' => $ipsandports,
'value' => explode(',', Settings::Get('system.defaultip')),
'is_array' => 1,
'mandatory' => true
),
'selectserveralias' => array(
'label' => $lng['admin']['selectserveralias'],
'desc' => $lng['admin']['selectserveralias_desc'],
],
'selectserveralias' => [
'label' => lng('admin.selectserveralias'),
'desc' => lng('admin.selectserveralias_desc'),
'type' => 'select',
'select_var' => $serveraliasoptions,
'selected' => Settings::Get('system.domaindefaultalias')
),
'speciallogfile' => array(
'label' => $lng['admin']['speciallogfile']['title'],
'desc' => $lng['admin']['speciallogfile']['description'],
],
'speciallogfile' => [
'label' => lng('admin.speciallogfile.title'),
'desc' => lng('admin.speciallogfile.description'),
'type' => 'checkbox',
'value' => '1',
'checked' => false
),
'specialsettings' => array(
],
'specialsettings' => [
'visible' => $userinfo['change_serversettings'] == '1',
'label' => $lng['admin']['ownvhostsettings'],
'desc' => $lng['serversettings']['default_vhostconf']['description'],
'label' => lng('admin.ownvhostsettings'),
'desc' => lng('serversettings.default_vhostconf.description'),
'type' => 'textarea',
'cols' => 60,
'rows' => 12
),
'notryfiles' => array(
],
'notryfiles' => [
'visible' => (Settings::Get('system.webserver') == 'nginx' && $userinfo['change_serversettings'] == '1'),
'label' => $lng['admin']['notryfiles']['title'],
'desc' => $lng['admin']['notryfiles']['description'],
'label' => lng('admin.notryfiles.title'),
'desc' => lng('admin.notryfiles.description'),
'type' => 'checkbox',
'value' => '1',
'checked' => false
),
'writeaccesslog' => array(
'label' => $lng['admin']['writeaccesslog']['title'],
'desc' => $lng['admin']['writeaccesslog']['description'],
],
'writeaccesslog' => [
'label' => lng('admin.writeaccesslog.title'),
'desc' => lng('admin.writeaccesslog.description'),
'type' => 'checkbox',
'value' => '1',
'checked' => true
),
'writeerrorlog' => array(
'label' => $lng['admin']['writeerrorlog']['title'],
'desc' => $lng['admin']['writeerrorlog']['description'],
],
'writeerrorlog' => [
'label' => lng('admin.writeerrorlog.title'),
'desc' => lng('admin.writeerrorlog.description'),
'type' => 'checkbox',
'value' => '1',
'checked' => true
)
)
),
'section_bssl' => array(
'title' => $lng['admin']['webserversettings_ssl'],
]
]
],
'section_bssl' => [
'title' => lng('admin.webserversettings_ssl'),
'image' => 'icons/domain_add.png',
'visible' => Settings::Get('system.use_ssl') == '1',
'fields' => array(
'sslenabled' => array(
'fields' => [
'sslenabled' => [
'visible' => !empty($ssl_ipsandports),
'label' => $lng['admin']['domain_sslenabled'],
'label' => lng('admin.domain_sslenabled'),
'type' => 'checkbox',
'value' => '1',
'checked' => true
),
'no_ssl_available_info' => array(
],
'no_ssl_available_info' => [
'visible' => !empty($ssl_ipsandports),
'label' => 'SSL',
'type' => 'label',
'value' => $lng['panel']['nosslipsavailable']
),
'ssl_ipandport' => array(
'label' => $lng['domains']['ipandport_ssl_multi']['title'],
'desc' => $lng['domains']['ipandport_ssl_multi']['description'],
'value' => lng('panel.nosslipsavailable')
],
'ssl_ipandport' => [
'label' => lng('domains.ipandport_ssl_multi.title'),
'desc' => lng('domains.ipandport_ssl_multi.description'),
'type' => 'checkbox',
'values' => $ssl_ipsandports,
'value' => explode(',', Settings::Get('system.defaultsslip')),
'is_array' => 1
),
'ssl_redirect' => array(
],
'ssl_redirect' => [
'visible' => !empty($ssl_ipsandports),
'label' => $lng['domains']['ssl_redirect']['title'],
'desc' => $lng['domains']['ssl_redirect']['description'],
'label' => lng('domains.ssl_redirect.title'),
'desc' => lng('domains.ssl_redirect.description'),
'type' => 'checkbox',
'value' => '1',
'checked' => false
),
'letsencrypt' => array(
],
'letsencrypt' => [
'visible' => (Settings::Get('system.leenabled') == '1' && !empty($ssl_ipsandports)),
'label' => $lng['admin']['letsencrypt']['title'],
'desc' => $lng['admin']['letsencrypt']['description'],
'label' => lng('admin.letsencrypt.title'),
'desc' => lng('admin.letsencrypt.description'),
'type' => 'checkbox',
'value' => '1',
'checked' => false
),
'http2' => array(
],
'http2' => [
'visible' => !empty($ssl_ipsandports) && Settings::Get('system.webserver') != 'lighttpd' && Settings::Get('system.http2_support') == '1',
'label' => $lng['admin']['domain_http2']['title'],
'desc' => $lng['admin']['domain_http2']['description'],
'label' => lng('admin.domain_http2.title'),
'desc' => lng('admin.domain_http2.description'),
'type' => 'checkbox',
'value' => '1',
'checked' => false
),
'override_tls' => array(
],
'override_tls' => [
'visible' => !empty($ssl_ipsandports) && $userinfo['change_serversettings'] == '1',
'label' => $lng['admin']['domain_override_tls'],
'label' => lng('admin.domain_override_tls'),
'type' => 'checkbox',
'value' => '1',
'checked' => false
),
'ssl_protocols' => array(
],
'ssl_protocols' => [
'visible' => !empty($ssl_ipsandports) && $userinfo['change_serversettings'] == '1' && Settings::Get('system.webserver') != 'lighttpd',
'label' => $lng['serversettings']['ssl']['ssl_protocols']['title'],
'desc' => $lng['serversettings']['ssl']['ssl_protocols']['description'],
'label' => lng('serversettings.ssl.ssl_protocols.title'),
'desc' => lng('serversettings.ssl.ssl_protocols.description'),
'type' => 'checkbox',
'value' => array(
'value' => [
'TLSv1.2'
),
'values' => array(
array(
],
'values' => [
[
'value' => 'TLSv1',
'label' => 'TLSv1'
),
array(
],
[
'value' => 'TLSv1.1',
'label' => 'TLSv1.1'
),
array(
],
[
'value' => 'TLSv1.2',
'label' => 'TLSv1.2'
),
array(
],
[
'value' => 'TLSv1.3',
'label' => 'TLSv1.3'
)
),
]
],
'is_array' => 1
),
'ssl_cipher_list' => array(
],
'ssl_cipher_list' => [
'visible' => !empty($ssl_ipsandports) && $userinfo['change_serversettings'] == '1',
'label' => $lng['serversettings']['ssl']['ssl_cipher_list']['title'],
'desc' => $lng['serversettings']['ssl']['ssl_cipher_list']['description'],
'label' => lng('serversettings.ssl.ssl_cipher_list.title'),
'desc' => lng('serversettings.ssl.ssl_cipher_list.description'),
'type' => 'text',
'value' => Settings::Get('system.ssl_cipher_list')
),
'tlsv13_cipher_list' => array(
],
'tlsv13_cipher_list' => [
'visible' => !empty($ssl_ipsandports) && $userinfo['change_serversettings'] == '1' && Settings::Get('system.webserver') == "apache2" && Settings::Get('system.apache24') == 1,
'label' => $lng['serversettings']['ssl']['tlsv13_cipher_list']['title'],
'desc' => $lng['serversettings']['ssl']['tlsv13_cipher_list']['description'],
'label' => lng('serversettings.ssl.tlsv13_cipher_list.title'),
'desc' => lng('serversettings.ssl.tlsv13_cipher_list.description'),
'type' => 'text',
'value' => Settings::Get('system.tlsv13_cipher_list')
),
'ssl_specialsettings' => array(
],
'ssl_specialsettings' => [
'visible' => !empty($ssl_ipsandports) && $userinfo['change_serversettings'] == '1',
'label' => $lng['admin']['ownsslvhostsettings'],
'desc' => $lng['serversettings']['default_vhostconf']['description'],
'label' => lng('admin.ownsslvhostsettings'),
'desc' => lng('serversettings.default_vhostconf.description'),
'type' => 'textarea',
'cols' => 60,
'rows' => 12
),
'include_specialsettings' => array(
],
'include_specialsettings' => [
'visible' => !empty($ssl_ipsandports) && $userinfo['change_serversettings'] == '1',
'label' => $lng['admin']['include_ownvhostsettings'],
'label' => lng('admin.include_ownvhostsettings'),
'type' => 'checkbox',
'value' => '1',
'checked' => false
),
'hsts_maxage' => array(
],
'hsts_maxage' => [
'visible' => $ssl_ipsandports != '',
'label' => $lng['admin']['domain_hsts_maxage']['title'],
'desc' => $lng['admin']['domain_hsts_maxage']['description'],
'label' => lng('admin.domain_hsts_maxage.title'),
'desc' => lng('admin.domain_hsts_maxage.description'),
'type' => 'number',
'min' => 0,
'max' => 94608000, // 3-years
'value' => 0
),
'hsts_sub' => array(
],
'hsts_sub' => [
'visible' => !empty($ssl_ipsandports),
'label' => $lng['admin']['domain_hsts_incsub']['title'],
'desc' => $lng['admin']['domain_hsts_incsub']['description'],
'label' => lng('admin.domain_hsts_incsub.title'),
'desc' => lng('admin.domain_hsts_incsub.description'),
'type' => 'checkbox',
'value' => '1',
'checked' => false
),
'hsts_preload' => array(
],
'hsts_preload' => [
'visible' => !empty($ssl_ipsandports),
'label' => $lng['admin']['domain_hsts_preload']['title'],
'desc' => $lng['admin']['domain_hsts_preload']['description'],
'label' => lng('admin.domain_hsts_preload.title'),
'desc' => lng('admin.domain_hsts_preload.description'),
'type' => 'checkbox',
'value' => '1',
'checked' => false
),
'ocsp_stapling' => array(
],
'ocsp_stapling' => [
'visible' => !empty($ssl_ipsandports) && Settings::Get('system.webserver') != 'lighttpd',
'label' => $lng['admin']['domain_ocsp_stapling']['title'],
'desc' => $lng['admin']['domain_ocsp_stapling']['description'] . (Settings::Get('system.webserver') == 'nginx' ? $lng['admin']['domain_ocsp_stapling']['nginx_version_warning'] : ""),
'label' => lng('admin.domain_ocsp_stapling.title'),
'desc' => lng('admin.domain_ocsp_stapling.description') . (Settings::Get('system.webserver') == 'nginx' ? lng('admin.domain_ocsp_stapling.nginx_version_warning') : ""),
'type' => 'checkbox',
'value' => '1',
'checked' => false
),
'honorcipherorder' => array(
],
'honorcipherorder' => [
'visible' => !empty($ssl_ipsandports),
'label' => $lng['admin']['domain_honorcipherorder'],
'label' => lng('admin.domain_honorcipherorder'),
'type' => 'checkbox',
'value' => '1',
'checked' => false
),
'sessiontickets' => array(
],
'sessiontickets' => [
'visible' => !empty($ssl_ipsandports) && Settings::Get('system.webserver') != 'lighttpd' && Settings::Get('system.sessionticketsenabled' != '1'),
'label' => $lng['admin']['domain_sessiontickets'],
'label' => lng('admin.domain_sessiontickets'),
'type' => 'checkbox',
'value' => '1',
'checked' => true
)
)
),
'section_c' => array(
'title' => $lng['admin']['phpserversettings'],
]
]
],
'section_c' => [
'title' => lng('admin.phpserversettings'),
'image' => 'icons/domain_add.png',
'visible' => $userinfo['change_serversettings'] == '1' || $userinfo['caneditphpsettings'] == '1',
'fields' => array(
'openbasedir' => array(
'fields' => [
'openbasedir' => [
'label' => 'OpenBasedir',
'type' => 'checkbox',
'value' => '1',
'checked' => true
),
'phpenabled' => array(
'label' => $lng['admin']['phpenabled'],
],
'phpenabled' => [
'label' => lng('admin.phpenabled'),
'type' => 'checkbox',
'value' => '1',
'checked' => true
),
'phpsettingid' => array(
'visible' => (int) Settings::Get('system.mod_fcgid') == 1 || (int) Settings::Get('phpfpm.enabled') == 1,
'label' => $lng['admin']['phpsettings']['title'],
],
'phpsettingid' => [
'visible' => (int)Settings::Get('system.mod_fcgid') == 1 || (int)Settings::Get('phpfpm.enabled') == 1,
'label' => lng('admin.phpsettings.title'),
'type' => 'select',
'select_var' => $phpconfigs,
'selected' => (int) Settings::Get('phpfpm.enabled') == 1 ? Settings::Get('phpfpm.defaultini') : Settings::Get('system.mod_fcgid_defaultini')
),
'mod_fcgid_starter' => array(
'visible' => (int) Settings::Get('system.mod_fcgid') == 1,
'label' => $lng['admin']['mod_fcgid_starter']['title'],
'selected' => (int)Settings::Get('phpfpm.enabled') == 1 ? Settings::Get('phpfpm.defaultini') : Settings::Get('system.mod_fcgid_defaultini')
],
'mod_fcgid_starter' => [
'visible' => (int)Settings::Get('system.mod_fcgid') == 1,
'label' => lng('admin.mod_fcgid_starter.title'),
'type' => 'number'
),
'mod_fcgid_maxrequests' => array(
'visible' => (int) Settings::Get('system.mod_fcgid') == 1,
'label' => $lng['admin']['mod_fcgid_maxrequests']['title'],
],
'mod_fcgid_maxrequests' => [
'visible' => (int)Settings::Get('system.mod_fcgid') == 1,
'label' => lng('admin.mod_fcgid_maxrequests.title'),
'type' => 'number'
)
)
),
'section_d' => array(
'title' => $lng['admin']['nameserversettings'],
]
]
],
'section_d' => [
'title' => lng('admin.nameserversettings'),
'image' => 'icons/domain_add.png',
'visible' => Settings::Get('system.bind_enable') == '1' && $userinfo['change_serversettings'] == '1',
'fields' => array(
'isbinddomain' => array(
'fields' => [
'isbinddomain' => [
'label' => 'Nameserver',
'type' => 'checkbox',
'value' => '1',
'checked' => true
),
'zonefile' => array(
],
'zonefile' => [
'label' => 'Zonefile',
'desc' => $lng['admin']['bindzonewarning'],
'desc' => lng('admin.bindzonewarning'),
'type' => 'text'
)
)
)
)
)
);
]
]
]
]
]
];

View File

@@ -4,431 +4,442 @@
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
return array(
'domain_edit' => array(
'title' => $lng['admin']['domain_edit'],
use Froxlor\Settings;
return [
'domain_edit' => [
'title' => lng('admin.domain_edit'),
'image' => 'fa-solid fa-globe',
'self_overview' => ['section' => 'domains', 'page' => 'domains'],
'sections' => array(
'section_a' => array(
'title' => $lng['domains']['domainsettings'],
'sections' => [
'section_a' => [
'title' => lng('domains.domainsettings'),
'image' => 'icons/domain_edit.png',
'fields' => array(
'domain' => array(
'fields' => [
'domain' => [
'label' => 'Domain',
'type' => 'label',
'value' => $result['domain_ace']
),
'customerid' => array(
'label' => $lng['admin']['customer'],
'type' => (\Froxlor\Settings::Get('panel.allow_domain_change_customer') == '1' ? 'select' : 'infotext'),
],
'customerid' => [
'label' => lng('admin.customer'),
'type' => (Settings::Get('panel.allow_domain_change_customer') == '1' ? 'select' : 'infotext'),
'select_var' => (isset($customers) ? $customers : null),
'selected' => $result['customerid'],
'value' => (isset($result['customername']) ? $result['customername'] : null),
'mandatory' => true
),
'adminid' => array(
],
'adminid' => [
'visible' => $userinfo['customers_see_all'] == '1',
'label' => $lng['admin']['admin'],
'type' => (\Froxlor\Settings::Get('panel.allow_domain_change_admin') == '1' ? 'select' : 'infotext'),
'label' => lng('admin.admin'),
'type' => (Settings::Get('panel.allow_domain_change_admin') == '1' ? 'select' : 'infotext'),
'select_var' => (!empty($admins) ? $admins : null),
'selected' => (isset($result['adminid']) ? $result['adminid'] : $userinfo['adminid']),
'value' => (isset($result['adminname']) ? $result['adminname'] : null),
'mandatory' => true
),
'alias' => array(
],
'alias' => [
'visible' => $alias_check == '0',
'label' => $lng['domains']['aliasdomain'],
'label' => lng('domains.aliasdomain'),
'type' => 'select',
'select_var' => $domains,
'selected' => $result['aliasdomain']
),
'issubof' => array(
'label' => $lng['domains']['issubof'],
'desc' => $lng['domains']['issubofinfo'],
],
'issubof' => [
'label' => lng('domains.issubof'),
'desc' => lng('domains.issubofinfo'),
'type' => 'select',
'select_var' => $subtodomains,
'selected' => $result['ismainbutsubto']
),
'associated_info' => array(
'label' => $lng['domains']['associated_with_domain'],
],
'associated_info' => [
'label' => lng('domains.associated_with_domain'),
'type' => 'label',
'value' => $subdomains . ' ' . $lng['customer']['subdomains'] . ', ' . $alias_check . ' ' . $lng['domains']['aliasdomains'] . ', ' . $emails . ' ' . $lng['customer']['emails'] . ', ' . $email_accounts . ' ' . $lng['customer']['accounts'] . ', ' . $email_forwarders . ' ' . $lng['customer']['forwarders']
),
'caneditdomain' => array(
'label' => $lng['admin']['domain_editable']['title'],
'desc' => $lng['admin']['domain_editable']['desc'],
'value' => $subdomains . ' ' . lng('customer.subdomains') . ', ' . $alias_check . ' ' . lng('domains.aliasdomains') . ', ' . $emails . ' ' . lng('customer.emails') . ', ' . $email_accounts . ' ' . lng('customer.accounts') . ', ' . $email_forwarders . ' ' . lng('customer.forwarders')
],
'caneditdomain' => [
'label' => lng('admin.domain_editable.title'),
'desc' => lng('admin.domain_editable.desc'),
'type' => 'checkbox',
'value' => '1',
'checked' => $result['caneditdomain']
),
'add_date' => array(
'label' => $lng['domains']['add_date'],
'desc' => $lng['panel']['dateformat'],
],
'add_date' => [
'label' => lng('domains.add_date'),
'desc' => lng('panel.dateformat'),
'type' => 'label',
'value' => date('Y-m-d', (int) $result['add_date'])
),
'registration_date' => array(
'label' => $lng['domains']['registration_date'],
'desc' => $lng['panel']['dateformat'],
'value' => date('Y-m-d', (int)$result['add_date'])
],
'registration_date' => [
'label' => lng('domains.registration_date'),
'desc' => lng('panel.dateformat'),
'type' => 'text',
'value' => $result['registration_date'],
'size' => 10
),
'termination_date' => array(
'label' => $lng['domains']['termination_date'],
'desc' => $lng['panel']['dateformat'],
],
'termination_date' => [
'label' => lng('domains.termination_date'),
'desc' => lng('panel.dateformat'),
'type' => 'text',
'value' => $result['termination_date'],
'size' => 10
)
)
),
'section_e' => array(
'title' => $lng['admin']['mailserversettings'],
]
]
],
'section_e' => [
'title' => lng('admin.mailserversettings'),
'image' => 'icons/domain_edit.png',
'fields' => array(
'isemaildomain' => array(
'label' => $lng['admin']['emaildomain'],
'fields' => [
'isemaildomain' => [
'label' => lng('admin.emaildomain'),
'type' => 'checkbox',
'value' => '1',
'checked' => $result['isemaildomain']
),
'email_only' => array(
'label' => $lng['admin']['email_only'],
],
'email_only' => [
'label' => lng('admin.email_only'),
'type' => 'checkbox',
'value' => '1',
'checked' => $result['email_only']
),
'subcanemaildomain' => array(
'label' => $lng['admin']['subdomainforemail'],
],
'subcanemaildomain' => [
'label' => lng('admin.subdomainforemail'),
'type' => 'select',
'select_var' => $subcanemaildomain,
'selected' => $result['subcanemaildomain']
),
'dkim' => array(
'visible' => \Froxlor\Settings::Get('dkim.use_dkim') == '1',
],
'dkim' => [
'visible' => Settings::Get('dkim.use_dkim') == '1',
'label' => 'DomainKeys',
'type' => 'checkbox',
'value' => '1',
'checked' => $result['dkim']
)
)
),
'section_b' => array(
'title' => $lng['admin']['webserversettings'],
]
]
],
'section_b' => [
'title' => lng('admin.webserversettings'),
'image' => 'icons/domain_edit.png',
'fields' => array(
'documentroot' => array(
'fields' => [
'documentroot' => [
'label' => 'DocumentRoot',
'desc' => $lng['panel']['emptyfordefault'],
'desc' => lng('panel.emptyfordefault'),
'type' => 'text',
'value' => $result['documentroot']
),
'ipandport' => array(
'label' => $lng['domains']['ipandport_multi']['title'],
'desc' => $lng['domains']['ipandport_multi']['description'],
],
'ipandport' => [
'label' => lng('domains.ipandport_multi.title'),
'desc' => lng('domains.ipandport_multi.description'),
'type' => 'checkbox',
'values' => $ipsandports,
'value' => $usedips,
'is_array' => 1,
'mandatory' => true
),
'selectserveralias' => array(
'label' => $lng['admin']['selectserveralias'],
'desc' => $lng['admin']['selectserveralias_desc'],
],
'selectserveralias' => [
'label' => lng('admin.selectserveralias'),
'desc' => lng('admin.selectserveralias_desc'),
'type' => 'select',
'select_var' => $serveraliasoptions,
'selected' => $result['iswildcarddomain'] == '1' ? 0 : ($result['wwwserveralias'] == '1' ? 1 : 2)
),
'speciallogfile' => array(
'label' => $lng['admin']['speciallogfile']['title'],
'desc' => $lng['admin']['speciallogfile']['description'],
],
'speciallogfile' => [
'label' => lng('admin.speciallogfile.title'),
'desc' => lng('admin.speciallogfile.description'),
'type' => 'checkbox',
'value' => '1',
'checked' => $result['speciallogfile']
),
'speciallogverified' => array(
],
'speciallogverified' => [
'type' => 'hidden',
'value' => '0'
),
'specialsettings' => array(
],
'specialsettings' => [
'visible' => $userinfo['change_serversettings'] == '1',
'label' => $lng['admin']['ownvhostsettings'],
'desc' => $lng['serversettings']['default_vhostconf']['description'],
'label' => lng('admin.ownvhostsettings'),
'desc' => lng('serversettings.default_vhostconf.description'),
'type' => 'textarea',
'value' => $result['specialsettings'],
'cols' => 60,
'rows' => 12
),
'specialsettingsforsubdomains' => array(
],
'specialsettingsforsubdomains' => [
'visible' => $userinfo['change_serversettings'] == '1',
'label' => $lng['admin']['specialsettingsforsubdomains'],
'desc' => $lng['serversettings']['specialsettingsforsubdomains']['description'],
'label' => lng('admin.specialsettingsforsubdomains'),
'desc' => lng('serversettings.specialsettingsforsubdomains.description'),
'type' => 'checkbox',
'value' => '1',
'checked' => \Froxlor\Settings::Get('system.apply_specialsettings_default') == 1 ? '1' : '0'
),
'notryfiles' => array(
'visible' => (\Froxlor\Settings::Get('system.webserver') == 'nginx' && $userinfo['change_serversettings'] == '1'),
'label' => $lng['admin']['notryfiles']['title'],
'desc' => $lng['admin']['notryfiles']['description'],
'checked' => Settings::Get('system.apply_specialsettings_default') == 1 ? '1' : '0'
],
'notryfiles' => [
'visible' => (Settings::Get('system.webserver') == 'nginx' && $userinfo['change_serversettings'] == '1'),
'label' => lng('admin.notryfiles.title'),
'desc' => lng('admin.notryfiles.description'),
'type' => 'checkbox',
'value' => '1',
'checked' => $result['notryfiles']
),
'writeaccesslog' => array(
'label' => $lng['admin']['writeaccesslog']['title'],
'desc' => $lng['admin']['writeaccesslog']['description'],
],
'writeaccesslog' => [
'label' => lng('admin.writeaccesslog.title'),
'desc' => lng('admin.writeaccesslog.description'),
'type' => 'checkbox',
'value' => '1',
'checked' => $result['writeaccesslog']
),
'writeerrorlog' => array(
'label' => $lng['admin']['writeerrorlog']['title'],
'desc' => $lng['admin']['writeerrorlog']['description'],
],
'writeerrorlog' => [
'label' => lng('admin.writeerrorlog.title'),
'desc' => lng('admin.writeerrorlog.description'),
'type' => 'checkbox',
'value' => '1',
'checked' => $result['writeerrorlog']
)
)
),
'section_bssl' => array(
'title' => $lng['admin']['webserversettings_ssl'],
]
]
],
'section_bssl' => [
'title' => lng('admin.webserversettings_ssl'),
'image' => 'icons/domain_edit.png',
'visible' => \Froxlor\Settings::Get('system.use_ssl') == '1',
'fields' => array(
'sslenabled' => array(
'visible' => Settings::Get('system.use_ssl') == '1',
'fields' => [
'sslenabled' => [
'visible' => !empty($ssl_ipsandports),
'label' => $lng['admin']['domain_sslenabled'],
'label' => lng('admin.domain_sslenabled'),
'type' => 'checkbox',
'value' => '1',
'checked' => $result['ssl_enabled']
),
'no_ssl_available_info' => array(
],
'no_ssl_available_info' => [
'visible' => empty($ssl_ipsandports),
'label' => 'SSL',
'type' => 'label',
'value' => $lng['panel']['nosslipsavailable']
),
'ssl_ipandport' => array(
'label' => $lng['domains']['ipandport_ssl_multi']['title'],
'desc' => $lng['domains']['ipandport_ssl_multi']['description'],
'value' => lng('panel.nosslipsavailable')
],
'ssl_ipandport' => [
'label' => lng('domains.ipandport_ssl_multi.title'),
'desc' => lng('domains.ipandport_ssl_multi.description'),
'type' => 'checkbox',
'values' => $ssl_ipsandports,
'value' => $usedips,
'is_array' => 1
),
'ssl_redirect' => array(
],
'ssl_redirect' => [
'visible' => !empty($ssl_ipsandports),
'label' => $lng['domains']['ssl_redirect']['title'],
'desc' => $lng['domains']['ssl_redirect']['description'] . ($result['temporary_ssl_redirect'] > 1 ? $lng['domains']['ssl_redirect_temporarilydisabled'] : ''),
'label' => lng('domains.ssl_redirect.title'),
'desc' => lng('domains.ssl_redirect.description') . ($result['temporary_ssl_redirect'] > 1 ? lng('domains.ssl_redirect_temporarilydisabled') : ''),
'type' => 'checkbox',
'value' => '1',
'checked' => $result['ssl_redirect']
),
'letsencrypt' => array(
'visible' => (\Froxlor\Settings::Get('system.leenabled') == '1' && !empty($ssl_ipsandports)),
'label' => $lng['admin']['letsencrypt']['title'],
'desc' => $lng['admin']['letsencrypt']['description'],
],
'letsencrypt' => [
'visible' => (Settings::Get('system.leenabled') == '1' && !empty($ssl_ipsandports)),
'label' => lng('admin.letsencrypt.title'),
'desc' => lng('admin.letsencrypt.description'),
'type' => 'checkbox',
'value' => '1',
'checked' => $result['letsencrypt']
),
'http2' => array(
'visible' => !empty($ssl_ipsandports) && \Froxlor\Settings::Get('system.webserver') != 'lighttpd' && \Froxlor\Settings::Get('system.http2_support') == '1',
'label' => $lng['admin']['domain_http2']['title'],
'desc' => $lng['admin']['domain_http2']['description'],
],
'http2' => [
'visible' => !empty($ssl_ipsandports) && Settings::Get('system.webserver') != 'lighttpd' && Settings::Get('system.http2_support') == '1',
'label' => lng('admin.domain_http2.title'),
'desc' => lng('admin.domain_http2.description'),
'type' => 'checkbox',
'value' => '1',
'checked' => $result['http2']
),
'override_tls' => array(
],
'override_tls' => [
'visible' => !empty($ssl_ipsandports) && $userinfo['change_serversettings'] == '1',
'label' => $lng['admin']['domain_override_tls'],
'label' => lng('admin.domain_override_tls'),
'type' => 'checkbox',
'value' => '1',
'checked' => $result['override_tls']
),
'ssl_protocols' => array(
'visible' => !empty($ssl_ipsandports) && $userinfo['change_serversettings'] == '1' && \Froxlor\Settings::Get('system.webserver') != 'lighttpd',
'label' => $lng['serversettings']['ssl']['ssl_protocols']['title'],
'desc' => $lng['serversettings']['ssl']['ssl_protocols']['description'],
],
'ssl_protocols' => [
'visible' => !empty($ssl_ipsandports) && $userinfo['change_serversettings'] == '1' && Settings::Get('system.webserver') != 'lighttpd',
'label' => lng('serversettings.ssl.ssl_protocols.title'),
'desc' => lng('serversettings.ssl.ssl_protocols.description'),
'type' => 'checkbox',
'value' => !empty($result['ssl_protocols']) ? explode(",", $result['ssl_protocols']) : explode(",", \Froxlor\Settings::Get('system.ssl_protocols')),
'values' => array(
array(
'value' => !empty($result['ssl_protocols']) ? explode(",", $result['ssl_protocols']) : explode(",", Settings::Get('system.ssl_protocols')),
'values' => [
[
'value' => 'TLSv1',
'label' => 'TLSv1'
),
array(
],
[
'value' => 'TLSv1.1',
'label' => 'TLSv1.1'
),
array(
],
[
'value' => 'TLSv1.2',
'label' => 'TLSv1.2'
),
array(
],
[
'value' => 'TLSv1.3',
'label' => 'TLSv1.3'
)
),
]
],
'is_array' => 1
),
'ssl_cipher_list' => array(
],
'ssl_cipher_list' => [
'visible' => !empty($ssl_ipsandports) && $userinfo['change_serversettings'] == '1',
'label' => $lng['serversettings']['ssl']['ssl_cipher_list']['title'],
'desc' => $lng['serversettings']['ssl']['ssl_cipher_list']['description'],
'label' => lng('serversettings.ssl.ssl_cipher_list.title'),
'desc' => lng('serversettings.ssl.ssl_cipher_list.description'),
'type' => 'text',
'value' => !empty($result['ssl_cipher_list']) ? $result['ssl_cipher_list'] : \Froxlor\Settings::Get('system.ssl_cipher_list')
),
'tlsv13_cipher_list' => array(
'visible' => !empty($ssl_ipsandports) && $userinfo['change_serversettings'] == '1' && \Froxlor\Settings::Get('system.webserver') == "apache2" && \Froxlor\Settings::Get('system.apache24') == 1,
'label' => $lng['serversettings']['ssl']['tlsv13_cipher_list']['title'],
'desc' => $lng['serversettings']['ssl']['tlsv13_cipher_list']['description'],
'value' => !empty($result['ssl_cipher_list']) ? $result['ssl_cipher_list'] : Settings::Get('system.ssl_cipher_list')
],
'tlsv13_cipher_list' => [
'visible' => !empty($ssl_ipsandports) && $userinfo['change_serversettings'] == '1' && Settings::Get('system.webserver') == "apache2" && Settings::Get('system.apache24') == 1,
'label' => lng('serversettings.ssl.tlsv13_cipher_list.title'),
'desc' => lng('serversettings.ssl.tlsv13_cipher_list.description'),
'type' => 'text',
'value' => !empty($result['tlsv13_cipher_list']) ? $result['tlsv13_cipher_list'] : \Froxlor\Settings::Get('system.tlsv13_cipher_list')
),
'ssl_specialsettings' => array(
'value' => !empty($result['tlsv13_cipher_list']) ? $result['tlsv13_cipher_list'] : Settings::Get('system.tlsv13_cipher_list')
],
'ssl_specialsettings' => [
'visible' => $userinfo['change_serversettings'] == '1',
'label' => $lng['admin']['ownsslvhostsettings'],
'desc' => $lng['serversettings']['default_vhostconf']['description'],
'label' => lng('admin.ownsslvhostsettings'),
'desc' => lng('serversettings.default_vhostconf.description'),
'type' => 'textarea',
'cols' => 60,
'rows' => 12,
'value' => $result['ssl_specialsettings']
),
'include_specialsettings' => array(
'label' => $lng['admin']['include_ownvhostsettings'],
],
'include_specialsettings' => [
'label' => lng('admin.include_ownvhostsettings'),
'type' => 'checkbox',
'value' => '1',
'checked' => $result['include_specialsettings']
),
'hsts_maxage' => array(
],
'hsts_maxage' => [
'visible' => !empty($ssl_ipsandports),
'label' => $lng['admin']['domain_hsts_maxage']['title'],
'desc' => $lng['admin']['domain_hsts_maxage']['description'],
'label' => lng('admin.domain_hsts_maxage.title'),
'desc' => lng('admin.domain_hsts_maxage.description'),
'type' => 'number',
'min' => 0,
'max' => 94608000, // 3-years
'value' => $result['hsts']
),
'hsts_sub' => array(
],
'hsts_sub' => [
'visible' => !empty($ssl_ipsandports),
'label' => $lng['admin']['domain_hsts_incsub']['title'],
'desc' => $lng['admin']['domain_hsts_incsub']['description'],
'label' => lng('admin.domain_hsts_incsub.title'),
'desc' => lng('admin.domain_hsts_incsub.description'),
'type' => 'checkbox',
'value' => '1',
'checked' => $result['hsts_sub']
),
'hsts_preload' => array(
],
'hsts_preload' => [
'visible' => !empty($ssl_ipsandports),
'label' => $lng['admin']['domain_hsts_preload']['title'],
'desc' => $lng['admin']['domain_hsts_preload']['description'],
'label' => lng('admin.domain_hsts_preload.title'),
'desc' => lng('admin.domain_hsts_preload.description'),
'type' => 'checkbox',
'value' => '1',
'checked' => $result['hsts_preload']
),
'ocsp_stapling' => array(
'visible' => !empty($ssl_ipsandports) && \Froxlor\Settings::Get('system.webserver') != 'lighttpd',
'label' => $lng['admin']['domain_ocsp_stapling']['title'],
'desc' => $lng['admin']['domain_ocsp_stapling']['description'] . (\Froxlor\Settings::Get('system.webserver') == 'nginx' ? $lng['admin']['domain_ocsp_stapling']['nginx_version_warning'] : ""),
],
'ocsp_stapling' => [
'visible' => !empty($ssl_ipsandports) && Settings::Get('system.webserver') != 'lighttpd',
'label' => lng('admin.domain_ocsp_stapling.title'),
'desc' => lng('admin.domain_ocsp_stapling.description') . (Settings::Get('system.webserver') == 'nginx' ? lng('admin.domain_ocsp_stapling.nginx_version_warning') : ""),
'type' => 'checkbox',
'value' => '1',
'checked' => $result['ocsp_stapling']
),
'honorcipherorder' => array(
],
'honorcipherorder' => [
'visible' => !empty($ssl_ipsandports),
'label' => $lng['admin']['domain_honorcipherorder'],
'label' => lng('admin.domain_honorcipherorder'),
'type' => 'checkbox',
'value' => '1',
'checked' => $result['ssl_honorcipherorder']
),
'sessiontickets' => array(
'visible' => !empty($ssl_ipsandports) && \Froxlor\Settings::Get('system.webserver') != 'lighttpd' && \Froxlor\Settings::Get('system.sessionticketsenabled' != '1'),
'label' => $lng['admin']['domain_sessiontickets'],
],
'sessiontickets' => [
'visible' => !empty($ssl_ipsandports) && Settings::Get('system.webserver') != 'lighttpd' && Settings::Get('system.sessionticketsenabled' != '1'),
'label' => lng('admin.domain_sessiontickets'),
'type' => 'checkbox',
'value' => '1',
'checked' => $result['ssl_sessiontickets']
)
)
),
'section_c' => array(
'title' => $lng['admin']['phpserversettings'],
]
]
],
'section_c' => [
'title' => lng('admin.phpserversettings'),
'image' => 'icons/domain_edit.png',
'visible' => $userinfo['change_serversettings'] == '1' || $userinfo['caneditphpsettings'] == '1',
'fields' => array(
'openbasedir' => array(
'fields' => [
'openbasedir' => [
'label' => 'OpenBasedir',
'type' => 'checkbox',
'value' => '1',
'checked' => $result['openbasedir']
),
'phpenabled' => array(
'label' => $lng['admin']['phpenabled'],
],
'phpenabled' => [
'label' => lng('admin.phpenabled'),
'type' => 'checkbox',
'value' => '1',
'checked' => $result['phpenabled']
),
'phpsettingid' => array(
'visible' => (((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 || (int) \Froxlor\Settings::Get('phpfpm.enabled') == 1)),
'label' => $lng['admin']['phpsettings']['title'],
],
'phpsettingid' => [
'visible' => (((int)Settings::Get('system.mod_fcgid') == 1 || (int)Settings::Get('phpfpm.enabled') == 1)),
'label' => lng('admin.phpsettings.title'),
'type' => 'select',
'select_var' => $phpconfigs,
'selected' => $result['phpsettingid']
),
'phpsettingsforsubdomains' => array(
],
'phpsettingsforsubdomains' => [
'visible' => $userinfo['change_serversettings'] == '1',
'label' => $lng['admin']['phpsettingsforsubdomains'],
'desc' => $lng['serversettings']['phpsettingsforsubdomains']['description'],
'label' => lng('admin.phpsettingsforsubdomains'),
'desc' => lng('serversettings.phpsettingsforsubdomains.description'),
'type' => 'checkbox',
'value' => '1',
'checked' => \Froxlor\Settings::Get('system.apply_phpconfigs_default') == 1 ? '1' : '0'
),
'mod_fcgid_starter' => array(
'visible' => (int) \Froxlor\Settings::Get('system.mod_fcgid') == 1,
'label' => $lng['admin']['mod_fcgid_starter']['title'],
'checked' => Settings::Get('system.apply_phpconfigs_default') == 1 ? '1' : '0'
],
'mod_fcgid_starter' => [
'visible' => (int)Settings::Get('system.mod_fcgid') == 1,
'label' => lng('admin.mod_fcgid_starter.title'),
'type' => 'number',
'value' => ((int) $result['mod_fcgid_starter'] != -1 ? $result['mod_fcgid_starter'] : '')
),
'mod_fcgid_maxrequests' => array(
'visible' => (int) \Froxlor\Settings::Get('system.mod_fcgid') == 1,
'label' => $lng['admin']['mod_fcgid_maxrequests']['title'],
'value' => ((int)$result['mod_fcgid_starter'] != -1 ? $result['mod_fcgid_starter'] : '')
],
'mod_fcgid_maxrequests' => [
'visible' => (int)Settings::Get('system.mod_fcgid') == 1,
'label' => lng('admin.mod_fcgid_maxrequests.title'),
'type' => 'number',
'value' => ((int) $result['mod_fcgid_maxrequests'] != -1 ? $result['mod_fcgid_maxrequests'] : '')
)
)
),
'section_d' => array(
'title' => $lng['admin']['nameserversettings'],
'value' => ((int)$result['mod_fcgid_maxrequests'] != -1 ? $result['mod_fcgid_maxrequests'] : '')
]
]
],
'section_d' => [
'title' => lng('admin.nameserversettings'),
'image' => 'icons/domain_edit.png',
'visible' => \Froxlor\Settings::Get('system.bind_enable') == '1' && $userinfo['change_serversettings'] == '1',
'fields' => array(
'isbinddomain' => array(
'visible' => Settings::Get('system.bind_enable') == '1' && $userinfo['change_serversettings'] == '1',
'fields' => [
'isbinddomain' => [
'label' => 'Nameserver',
'type' => 'checkbox',
'value' => '1',
'checked' => $result['isbinddomain']
),
'zonefile' => array(
],
'zonefile' => [
'label' => 'Zonefile',
'desc' => $lng['admin']['bindzonewarning'],
'desc' => lng('admin.bindzonewarning'),
'type' => 'text',
'value' => $result['zonefile']
)
)
)
)
)
);
]
]
]
]
]
];

View File

@@ -4,48 +4,57 @@
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
return array(
'domain_import' => array(
'title' => $lng['domains']['domain_import'],
return [
'domain_import' => [
'title' => lng('domains.domain_import'),
'image' => 'fa-solid fa-file-import',
'self_overview' => ['section' => 'domains', 'page' => 'domains'],
'sections' => array(
'section_a' => array(
'title' => $lng['domains']['domain_import'],
'sections' => [
'section_a' => [
'title' => lng('domains.domain_import'),
'image' => 'icons/domain_add.png',
'fields' => array(
'separator' => array(
'label' => $lng['domains']['import_separator'],
'fields' => [
'separator' => [
'label' => lng('domains.import_separator'),
'type' => 'text',
'mandatory' => true,
'size' => 5,
'value' => ';'
),
'offset' => array(
'label' => $lng['domains']['import_offset'],
],
'offset' => [
'label' => lng('domains.import_offset'),
'type' => 'number',
'mandatory' => true,
'size' => 10,
'min' => 0,
'value' => '0'
),
'file' => array(
'label' => $lng['domains']['import_file'],
],
'file' => [
'label' => lng('domains.import_file'),
'type' => 'file',
'mandatory' => true
)
)
)
)
)
);
]
]
]
]
]
];

View File

@@ -4,156 +4,167 @@
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
return array(
'ipsandports_add' => array(
'title' => $lng['admin']['ipsandports']['add'],
use Froxlor\Settings;
return [
'ipsandports_add' => [
'title' => lng('admin.ipsandports.add'),
'image' => 'fa-solid fa-plus',
'self_overview' => ['section' => 'ipsandports', 'page' => 'ipsandports'],
'sections' => array(
'section_a' => array(
'title' => $lng['admin']['ipsandports']['ipandport'],
'sections' => [
'section_a' => [
'title' => lng('admin.ipsandports.ipandport'),
'image' => 'icons/ipsports_add.png',
'fields' => array(
'ip' => array(
'label' => $lng['admin']['ipsandports']['ip'],
'fields' => [
'ip' => [
'label' => lng('admin.ipsandports.ip'),
'type' => 'text',
'mandatory' => true
),
'port' => array(
'label' => $lng['admin']['ipsandports']['port'],
],
'port' => [
'label' => lng('admin.ipsandports.port'),
'type' => 'number',
'min' => 1,
'max' => 65535,
'value' => 80,
'mandatory' => true
)
)
),
'section_b' => array(
'title' => $lng['admin']['ipsandports']['webserverdefaultconfig'],
]
]
],
'section_b' => [
'title' => lng('admin.ipsandports.webserverdefaultconfig'),
'image' => 'icons/ipsports_add.png',
'fields' => array(
'listen_statement' => array(
'visible' => ! \Froxlor\Settings::Get('system.webserver') == 'nginx',
'label' => $lng['admin']['ipsandports']['create_listen_statement'],
'fields' => [
'listen_statement' => [
'visible' => !Settings::Get('system.webserver') == 'nginx',
'label' => lng('admin.ipsandports.create_listen_statement'),
'type' => 'checkbox',
'value' => '1',
'checked' => false
),
'namevirtualhost_statement' => array(
'visible' => \Froxlor\Settings::Get('system.webserver') == 'apache2' && (int) \Froxlor\Settings::Get('system.apache24') == 0,
'label' => $lng['admin']['ipsandports']['create_namevirtualhost_statement'],
],
'namevirtualhost_statement' => [
'visible' => Settings::Get('system.webserver') == 'apache2' && (int)Settings::Get('system.apache24') == 0,
'label' => lng('admin.ipsandports.create_namevirtualhost_statement'),
'type' => 'checkbox',
'value' => '1',
'checked' => \Froxlor\Settings::Get('system.webserver') == 'apache2' && (int) \Froxlor\Settings::Get('system.apache24') == 0
),
'vhostcontainer' => array(
'label' => $lng['admin']['ipsandports']['create_vhostcontainer'],
'checked' => Settings::Get('system.webserver') == 'apache2' && (int)Settings::Get('system.apache24') == 0
],
'vhostcontainer' => [
'label' => lng('admin.ipsandports.create_vhostcontainer'),
'type' => 'checkbox',
'value' => '1',
'checked' => true
),
'docroot' => array(
'label' => $lng['admin']['ipsandports']['docroot']['title'],
'desc' => $lng['admin']['ipsandports']['docroot']['description'],
],
'docroot' => [
'label' => lng('admin.ipsandports.docroot.title'),
'desc' => lng('admin.ipsandports.docroot.description'),
'type' => 'text'
),
'specialsettings' => array(
'label' => $lng['admin']['ownvhostsettings'],
'desc' => $lng['serversettings']['default_vhostconf']['description'],
],
'specialsettings' => [
'label' => lng('admin.ownvhostsettings'),
'desc' => lng('serversettings.default_vhostconf.description'),
'type' => 'textarea',
'cols' => 60,
'rows' => 12
),
'vhostcontainer_servername_statement' => array(
'visible' => \Froxlor\Settings::Get('system.webserver') == 'apache2',
'label' => $lng['admin']['ipsandports']['create_vhostcontainer_servername_statement'],
],
'vhostcontainer_servername_statement' => [
'visible' => Settings::Get('system.webserver') == 'apache2',
'label' => lng('admin.ipsandports.create_vhostcontainer_servername_statement'),
'type' => 'checkbox',
'value' => '1',
'checked' => true
)
)
),
'section_c' => array(
'title' => $lng['admin']['ipsandports']['webserverdomainconfig'],
]
]
],
'section_c' => [
'title' => lng('admin.ipsandports.webserverdomainconfig'),
'image' => 'icons/ipsports_add.png',
'fields' => array(
'default_vhostconf_domain' => array(
'label' => $lng['admin']['ipsandports']['default_vhostconf_domain'],
'desc' => $lng['serversettings']['default_vhostconf_domain']['description'],
'fields' => [
'default_vhostconf_domain' => [
'label' => lng('admin.ipsandports.default_vhostconf_domain'),
'desc' => lng('serversettings.default_vhostconf_domain.description'),
'type' => 'textarea',
'cols' => 60,
'rows' => 12
),
'ssl_default_vhostconf_domain' => array(
'visible' => \Froxlor\Settings::Get('system.use_ssl') == 1,
'label' => $lng['admin']['ipsandports']['ssl_default_vhostconf_domain'],
'desc' => $lng['serversettings']['default_vhostconf_domain']['description'],
],
'ssl_default_vhostconf_domain' => [
'visible' => Settings::Get('system.use_ssl') == 1,
'label' => lng('admin.ipsandports.ssl_default_vhostconf_domain'),
'desc' => lng('serversettings.default_vhostconf_domain.description'),
'type' => 'textarea',
'cols' => 60,
'rows' => 12
),
'include_default_vhostconf_domain' => array(
'label' => $lng['admin']['include_ownvhostsettings'],
],
'include_default_vhostconf_domain' => [
'label' => lng('admin.include_ownvhostsettings'),
'type' => 'checkbox',
'value' => '1',
'checked' => false
)
)
),
'section_d' => array(
'title' => $lng['admin']['ipsandports']['webserverssldomainconfig'],
]
]
],
'section_d' => [
'title' => lng('admin.ipsandports.webserverssldomainconfig'),
'image' => 'icons/ipsports_add.png',
'visible' => \Froxlor\Settings::Get('system.use_ssl') == 1,
'fields' => array(
'ssl' => array(
'label' => $lng['admin']['ipsandports']['enable_ssl'],
'visible' => Settings::Get('system.use_ssl') == 1,
'fields' => [
'ssl' => [
'label' => lng('admin.ipsandports.enable_ssl'),
'type' => 'checkbox',
'value' => '1',
'checked' => false
),
'ssl_cert_file' => array(
'label' => $lng['admin']['ipsandports']['ssl_cert_file'],
],
'ssl_cert_file' => [
'label' => lng('admin.ipsandports.ssl_cert_file'),
'type' => 'text'
),
'ssl_key_file' => array(
'label' => $lng['admin']['ipsandports']['ssl_key_file'],
],
'ssl_key_file' => [
'label' => lng('admin.ipsandports.ssl_key_file'),
'type' => 'text'
),
'ssl_ca_file' => array(
'label' => $lng['admin']['ipsandports']['ssl_ca_file'],
],
'ssl_ca_file' => [
'label' => lng('admin.ipsandports.ssl_ca_file'),
'type' => 'text'
),
'ssl_cert_chainfile' => array(
'label' => $lng['admin']['ipsandports']['ssl_cert_chainfile']['title'],
'desc' => $lng['admin']['ipsandports']['ssl_cert_chainfile']['description'],
],
'ssl_cert_chainfile' => [
'label' => lng('admin.ipsandports.ssl_cert_chainfile.title'),
'desc' => lng('admin.ipsandports.ssl_cert_chainfile.description'),
'type' => 'text'
),
'ssl_specialsettings' => array(
'label' => $lng['admin']['ownsslvhostsettings'],
'desc' => $lng['serversettings']['default_vhostconf']['description'],
],
'ssl_specialsettings' => [
'label' => lng('admin.ownsslvhostsettings'),
'desc' => lng('serversettings.default_vhostconf.description'),
'type' => 'textarea',
'cols' => 60,
'rows' => 12
),
'include_specialsettings' => array(
'label' => $lng['admin']['include_ownvhostsettings'],
],
'include_specialsettings' => [
'label' => lng('admin.include_ownvhostsettings'),
'type' => 'checkbox',
'value' => '1',
'checked' => false
)
)
)
)
)
);
]
]
]
]
]
];

View File

@@ -4,166 +4,177 @@
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
return array(
'ipsandports_edit' => array(
'title' => $lng['admin']['ipsandports']['edit'],
use Froxlor\Settings;
return [
'ipsandports_edit' => [
'title' => lng('admin.ipsandports.edit'),
'image' => 'fa-solid fa-pen',
'self_overview' => ['section' => 'ipsandports', 'page' => 'ipsandports'],
'sections' => array(
'section_a' => array(
'title' => $lng['admin']['ipsandports']['ipandport'],
'sections' => [
'section_a' => [
'title' => lng('admin.ipsandports.ipandport'),
'image' => 'icons/ipsports_add.png',
'fields' => array(
'ip' => array(
'label' => $lng['admin']['ipsandports']['ip'],
'fields' => [
'ip' => [
'label' => lng('admin.ipsandports.ip'),
'type' => 'text',
'value' => $result['ip'],
'mandatory' => true
),
'port' => array(
'label' => $lng['admin']['ipsandports']['port'],
],
'port' => [
'label' => lng('admin.ipsandports.port'),
'type' => 'number',
'value' => $result['port'],
'min' => 1,
'max' => 65535,
'mandatory' => true
)
)
),
'section_b' => array(
'title' => $lng['admin']['ipsandports']['webserverdefaultconfig'],
]
]
],
'section_b' => [
'title' => lng('admin.ipsandports.webserverdefaultconfig'),
'image' => 'icons/ipsports_edit.png',
'fields' => array(
'listen_statement' => array(
'visible' => ! \Froxlor\Settings::Get('system.webserver') == 'nginx',
'label' => $lng['admin']['ipsandports']['create_listen_statement'],
'fields' => [
'listen_statement' => [
'visible' => !Settings::Get('system.webserver') == 'nginx',
'label' => lng('admin.ipsandports.create_listen_statement'),
'type' => 'checkbox',
'value' => '1',
'checked' => $result['listen_statement']
),
'namevirtualhost_statement' => array(
'visible' => \Froxlor\Settings::Get('system.webserver') == 'apache2' && (int) \Froxlor\Settings::Get('system.apache24') == 0,
'label' => $lng['admin']['ipsandports']['create_namevirtualhost_statement'],
],
'namevirtualhost_statement' => [
'visible' => Settings::Get('system.webserver') == 'apache2' && (int)Settings::Get('system.apache24') == 0,
'label' => lng('admin.ipsandports.create_namevirtualhost_statement'),
'type' => 'checkbox',
'value' => '1',
'checked' => $result['namevirtualhost_statement']
),
'vhostcontainer' => array(
'label' => $lng['admin']['ipsandports']['create_vhostcontainer'],
],
'vhostcontainer' => [
'label' => lng('admin.ipsandports.create_vhostcontainer'),
'type' => 'checkbox',
'value' => '1',
'checked' => $result['vhostcontainer']
),
'docroot' => array(
'label' => $lng['admin']['ipsandports']['docroot']['title'],
'desc' => $lng['admin']['ipsandports']['docroot']['description'],
],
'docroot' => [
'label' => lng('admin.ipsandports.docroot.title'),
'desc' => lng('admin.ipsandports.docroot.description'),
'type' => 'text',
'value' => $result['docroot']
),
'specialsettings' => array(
'label' => $lng['admin']['ownvhostsettings'],
'desc' => $lng['serversettings']['default_vhostconf']['description'],
],
'specialsettings' => [
'label' => lng('admin.ownvhostsettings'),
'desc' => lng('serversettings.default_vhostconf.description'),
'type' => 'textarea',
'cols' => 60,
'rows' => 12,
'value' => $result['specialsettings']
),
'vhostcontainer_servername_statement' => array(
'visible' => \Froxlor\Settings::Get('system.webserver') == 'apache2',
'label' => $lng['admin']['ipsandports']['create_vhostcontainer_servername_statement'],
],
'vhostcontainer_servername_statement' => [
'visible' => Settings::Get('system.webserver') == 'apache2',
'label' => lng('admin.ipsandports.create_vhostcontainer_servername_statement'),
'type' => 'checkbox',
'value' => '1',
'checked' => $result['vhostcontainer_servername_statement']
)
)
),
'section_c' => array(
'title' => $lng['admin']['ipsandports']['webserverdomainconfig'],
]
]
],
'section_c' => [
'title' => lng('admin.ipsandports.webserverdomainconfig'),
'image' => 'icons/ipsports_edit.png',
'fields' => array(
'default_vhostconf_domain' => array(
'label' => $lng['admin']['ipsandports']['default_vhostconf_domain'],
'desc' => $lng['serversettings']['default_vhostconf_domain']['description'],
'fields' => [
'default_vhostconf_domain' => [
'label' => lng('admin.ipsandports.default_vhostconf_domain'),
'desc' => lng('serversettings.default_vhostconf_domain.description'),
'type' => 'textarea',
'cols' => 60,
'rows' => 12,
'value' => $result['default_vhostconf_domain']
),
'ssl_default_vhostconf_domain' => array(
'visible' => \Froxlor\Settings::Get('system.use_ssl') == 1,
'label' => $lng['admin']['ipsandports']['ssl_default_vhostconf_domain'],
'desc' => $lng['serversettings']['default_vhostconf_domain']['description'],
],
'ssl_default_vhostconf_domain' => [
'visible' => Settings::Get('system.use_ssl') == 1,
'label' => lng('admin.ipsandports.ssl_default_vhostconf_domain'),
'desc' => lng('serversettings.default_vhostconf_domain.description'),
'type' => 'textarea',
'cols' => 60,
'rows' => 12,
'value' => $result['ssl_default_vhostconf_domain']
),
'include_default_vhostconf_domain' => array(
'label' => $lng['admin']['include_ownvhostsettings'],
],
'include_default_vhostconf_domain' => [
'label' => lng('admin.include_ownvhostsettings'),
'type' => 'checkbox',
'value' => '1',
'checked' => $result['include_default_vhostconf_domain']
)
)
),
'section_d' => array(
'title' => $lng['admin']['ipsandports']['webserverssldomainconfig'],
]
]
],
'section_d' => [
'title' => lng('admin.ipsandports.webserverssldomainconfig'),
'image' => 'icons/ipsports_edit.png',
'visible' => \Froxlor\Settings::Get('system.use_ssl') == 1,
'fields' => array(
'ssl' => array(
'label' => $lng['admin']['ipsandports']['enable_ssl'],
'visible' => Settings::Get('system.use_ssl') == 1,
'fields' => [
'ssl' => [
'label' => lng('admin.ipsandports.enable_ssl'),
'type' => 'checkbox',
'value' => '1',
'checked' => $result['ssl']
),
'ssl_cert_file' => array(
'label' => $lng['admin']['ipsandports']['ssl_cert_file'],
],
'ssl_cert_file' => [
'label' => lng('admin.ipsandports.ssl_cert_file'),
'type' => 'text',
'value' => $result['ssl_cert_file']
),
'ssl_key_file' => array(
'label' => $lng['admin']['ipsandports']['ssl_key_file'],
],
'ssl_key_file' => [
'label' => lng('admin.ipsandports.ssl_key_file'),
'type' => 'text',
'value' => $result['ssl_key_file']
),
'ssl_ca_file' => array(
'label' => $lng['admin']['ipsandports']['ssl_ca_file'],
],
'ssl_ca_file' => [
'label' => lng('admin.ipsandports.ssl_ca_file'),
'type' => 'text',
'value' => $result['ssl_ca_file']
),
'ssl_cert_chainfile' => array(
'label' => $lng['admin']['ipsandports']['ssl_cert_chainfile']['title'],
'desc' => $lng['admin']['ipsandports']['ssl_cert_chainfile']['description'],
],
'ssl_cert_chainfile' => [
'label' => lng('admin.ipsandports.ssl_cert_chainfile.title'),
'desc' => lng('admin.ipsandports.ssl_cert_chainfile.description'),
'type' => 'text',
'value' => $result['ssl_cert_chainfile']
),
'ssl_specialsettings' => array(
'label' => $lng['admin']['ownsslvhostsettings'],
'desc' => $lng['serversettings']['default_vhostconf']['description'],
],
'ssl_specialsettings' => [
'label' => lng('admin.ownsslvhostsettings'),
'desc' => lng('serversettings.default_vhostconf.description'),
'type' => 'textarea',
'cols' => 60,
'rows' => 12,
'value' => $result['ssl_specialsettings']
),
'include_specialsettings' => array(
'label' => $lng['admin']['include_ownvhostsettings'],
],
'include_specialsettings' => [
'label' => lng('admin.include_ownvhostsettings'),
'type' => 'checkbox',
'value' => '1',
'checked' => $result['include_specialsettings']
)
)
)
)
)
);
]
]
]
]
]
];

View File

@@ -4,42 +4,51 @@
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
return array(
'messages_add' => array(
'title' => $lng['admin']['message'],
return [
'messages_add' => [
'title' => lng('admin.message'),
'image' => 'fa-solid fa-paper-plane',
'sections' => array(
'section_a' => array(
'fields' => array(
'recipient' => array(
'label' => $lng['admin']['recipient'],
'sections' => [
'section_a' => [
'fields' => [
'recipient' => [
'label' => lng('admin.recipient'),
'type' => 'select',
'select_var' => $recipients,
'selected' => 1
),
'subject' => array(
'label' => $lng['admin']['subject'],
],
'subject' => [
'label' => lng('admin.subject'),
'type' => 'text',
'value' => $lng['admin']['nosubject'],
'value' => lng('admin.nosubject'),
'mandatory' => true
),
'message' => array(
'label' => $lng['admin']['text'],
],
'message' => [
'label' => lng('admin.text'),
'type' => 'textarea',
'mandatory' => true
)
)
)
)
)
);
]
]
]
]
]
];

View File

@@ -4,105 +4,114 @@
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
return array(
'fpmconfig_add' => array(
'title' => $lng['admin']['phpsettings']['addsettings'],
return [
'fpmconfig_add' => [
'title' => lng('admin.phpsettings.addsettings'),
'image' => 'fa-solid fa-plus',
'self_overview' => ['section' => 'phpsettings', 'page' => 'fpmdaemons'],
'sections' => array(
'section_a' => array(
'title' => $lng['admin']['phpsettings']['addsettings'],
'sections' => [
'section_a' => [
'title' => lng('admin.phpsettings.addsettings'),
'image' => 'icons/phpsettings_add.png',
'fields' => array(
'description' => array(
'label' => $lng['admin']['phpsettings']['description'],
'fields' => [
'description' => [
'label' => lng('admin.phpsettings.description'),
'type' => 'text',
'maxlength' => 50
),
'reload_cmd' => array(
'label' => $lng['serversettings']['phpfpm_settings']['reload'],
],
'reload_cmd' => [
'label' => lng('serversettings.phpfpm_settings.reload'),
'type' => 'text',
'maxlength' => 255,
'value' => 'service php7.4-fpm restart'
),
'config_dir' => array(
'label' => $lng['serversettings']['phpfpm_settings']['configdir'],
],
'config_dir' => [
'label' => lng('serversettings.phpfpm_settings.configdir'),
'type' => 'text',
'maxlength' => 255,
'value' => '/etc/php/7.4/fpm/pool.d/'
),
'pm' => array(
'label' => $lng['serversettings']['phpfpm_settings']['pm'],
],
'pm' => [
'label' => lng('serversettings.phpfpm_settings.pm'),
'type' => 'select',
'select_var' => [
'static' => 'static',
'dynamic' => 'dynamic',
'ondemand' => 'ondemand'
]
),
'max_children' => array(
'label' => $lng['serversettings']['phpfpm_settings']['max_children']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['max_children']['description'],
],
'max_children' => [
'label' => lng('serversettings.phpfpm_settings.max_children.title'),
'desc' => lng('serversettings.phpfpm_settings.max_children.description'),
'type' => 'number',
'value' => 5,
'min' => 1
),
'start_servers' => array(
'label' => $lng['serversettings']['phpfpm_settings']['start_servers']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['start_servers']['description'],
],
'start_servers' => [
'label' => lng('serversettings.phpfpm_settings.start_servers.title'),
'desc' => lng('serversettings.phpfpm_settings.start_servers.description'),
'type' => 'number',
'value' => 2,
'min' => 1
),
'min_spare_servers' => array(
'label' => $lng['serversettings']['phpfpm_settings']['min_spare_servers']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['min_spare_servers']['description'],
],
'min_spare_servers' => [
'label' => lng('serversettings.phpfpm_settings.min_spare_servers.title'),
'desc' => lng('serversettings.phpfpm_settings.min_spare_servers.description'),
'type' => 'number',
'value' => 1
),
'max_spare_servers' => array(
'label' => $lng['serversettings']['phpfpm_settings']['max_spare_servers']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['max_spare_servers']['description'],
],
'max_spare_servers' => [
'label' => lng('serversettings.phpfpm_settings.max_spare_servers.title'),
'desc' => lng('serversettings.phpfpm_settings.max_spare_servers.description'),
'type' => 'number',
'value' => 3
),
'max_requests' => array(
'label' => $lng['serversettings']['phpfpm_settings']['max_requests']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['max_requests']['description'],
],
'max_requests' => [
'label' => lng('serversettings.phpfpm_settings.max_requests.title'),
'desc' => lng('serversettings.phpfpm_settings.max_requests.description'),
'type' => 'number',
'value' => 0
),
'idle_timeout' => array(
'label' => $lng['serversettings']['phpfpm_settings']['idle_timeout']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['idle_timeout']['description'],
],
'idle_timeout' => [
'label' => lng('serversettings.phpfpm_settings.idle_timeout.title'),
'desc' => lng('serversettings.phpfpm_settings.idle_timeout.description'),
'type' => 'number',
'value' => 10
),
'limit_extensions' => array(
'label' => $lng['serversettings']['phpfpm_settings']['limit_extensions']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['limit_extensions']['description'],
],
'limit_extensions' => [
'label' => lng('serversettings.phpfpm_settings.limit_extensions.title'),
'desc' => lng('serversettings.phpfpm_settings.limit_extensions.description'),
'type' => 'text',
'value' => '.php'
),
'custom_config' => array(
'label' => $lng['serversettings']['phpfpm_settings']['custom_config']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['custom_config']['description'],
],
'custom_config' => [
'label' => lng('serversettings.phpfpm_settings.custom_config.title'),
'desc' => lng('serversettings.phpfpm_settings.custom_config.description'),
'type' => 'textarea',
'cols' => 50,
'rows' => 7
)
)
)
)
)
);
]
]
]
]
]
];

View File

@@ -4,46 +4,55 @@
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
return array(
'fpmconfig_edit' => array(
'title' => $lng['admin']['phpsettings']['editsettings'],
return [
'fpmconfig_edit' => [
'title' => lng('admin.phpsettings.editsettings'),
'image' => 'fa-solid fa-pen',
'self_overview' => ['section' => 'phpsettings', 'page' => 'fpmdaemons'],
'sections' => array(
'section_a' => array(
'title' => $lng['admin']['phpsettings']['editsettings'],
'sections' => [
'section_a' => [
'title' => lng('admin.phpsettings.editsettings'),
'image' => 'icons/phpsettings_edit.png',
'fields' => array(
'description' => array(
'label' => $lng['admin']['phpsettings']['description'],
'fields' => [
'description' => [
'label' => lng('admin.phpsettings.description'),
'type' => 'text',
'maxlength' => 50,
'value' => $result['description']
),
'reload_cmd' => array(
'label' => $lng['serversettings']['phpfpm_settings']['reload'],
],
'reload_cmd' => [
'label' => lng('serversettings.phpfpm_settings.reload'),
'type' => 'text',
'maxlength' => 255,
'value' => $result['reload_cmd']
),
'config_dir' => array(
'label' => $lng['serversettings']['phpfpm_settings']['configdir'],
],
'config_dir' => [
'label' => lng('serversettings.phpfpm_settings.configdir'),
'type' => 'text',
'maxlength' => 255,
'value' => $result['config_dir']
),
'pm' => array(
'label' => $lng['serversettings']['phpfpm_settings']['pm'],
],
'pm' => [
'label' => lng('serversettings.phpfpm_settings.pm'),
'type' => 'select',
'select_var' => [
'static' => 'static',
@@ -51,61 +60,61 @@ return array(
'ondemand' => 'ondemand'
],
'selected' => $result['pm']
),
'max_children' => array(
'label' => $lng['serversettings']['phpfpm_settings']['max_children']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['max_children']['description'],
],
'max_children' => [
'label' => lng('serversettings.phpfpm_settings.max_children.title'),
'desc' => lng('serversettings.phpfpm_settings.max_children.description'),
'type' => 'number',
'value' => $result['max_children'],
'min' => 1
),
'start_servers' => array(
'label' => $lng['serversettings']['phpfpm_settings']['start_servers']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['start_servers']['description'],
],
'start_servers' => [
'label' => lng('serversettings.phpfpm_settings.start_servers.title'),
'desc' => lng('serversettings.phpfpm_settings.start_servers.description'),
'type' => 'number',
'value' => $result['start_servers'],
'min' => 1
),
'min_spare_servers' => array(
'label' => $lng['serversettings']['phpfpm_settings']['min_spare_servers']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['min_spare_servers']['description'],
],
'min_spare_servers' => [
'label' => lng('serversettings.phpfpm_settings.min_spare_servers.title'),
'desc' => lng('serversettings.phpfpm_settings.min_spare_servers.description'),
'type' => 'number',
'value' => $result['min_spare_servers']
),
'max_spare_servers' => array(
'label' => $lng['serversettings']['phpfpm_settings']['max_spare_servers']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['max_spare_servers']['description'],
],
'max_spare_servers' => [
'label' => lng('serversettings.phpfpm_settings.max_spare_servers.title'),
'desc' => lng('serversettings.phpfpm_settings.max_spare_servers.description'),
'type' => 'number',
'value' => $result['max_spare_servers']
),
'max_requests' => array(
'label' => $lng['serversettings']['phpfpm_settings']['max_requests']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['max_requests']['description'],
],
'max_requests' => [
'label' => lng('serversettings.phpfpm_settings.max_requests.title'),
'desc' => lng('serversettings.phpfpm_settings.max_requests.description'),
'type' => 'number',
'value' => $result['max_requests']
),
'idle_timeout' => array(
'label' => $lng['serversettings']['phpfpm_settings']['idle_timeout']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['idle_timeout']['description'],
],
'idle_timeout' => [
'label' => lng('serversettings.phpfpm_settings.idle_timeout.title'),
'desc' => lng('serversettings.phpfpm_settings.idle_timeout.description'),
'type' => 'number',
'value' => $result['idle_timeout']
),
'limit_extensions' => array(
'label' => $lng['serversettings']['phpfpm_settings']['limit_extensions']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['limit_extensions']['description'],
],
'limit_extensions' => [
'label' => lng('serversettings.phpfpm_settings.limit_extensions.title'),
'desc' => lng('serversettings.phpfpm_settings.limit_extensions.description'),
'type' => 'text',
'value' => $result['limit_extensions']
),
'custom_config' => array(
'label' => $lng['serversettings']['phpfpm_settings']['custom_config']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['custom_config']['description'],
],
'custom_config' => [
'label' => lng('serversettings.phpfpm_settings.custom_config.title'),
'desc' => lng('serversettings.phpfpm_settings.custom_config.description'),
'type' => 'textarea',
'cols' => 50,
'rows' => 7,
'value' => $result['custom_config']
)
)
)
)
)
);
]
]
]
]
]
];

View File

@@ -4,181 +4,192 @@
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
return array(
'phpconfig_add' => array(
'title' => $lng['admin']['phpsettings']['addsettings'],
use Froxlor\Settings;
return [
'phpconfig_add' => [
'title' => lng('admin.phpsettings.addsettings'),
'image' => 'fa-solid fa-plus',
'self_overview' => ['section' => 'phpsettings', 'page' => 'overview'],
'sections' => array(
'section_a' => array(
'title' => $lng['admin']['phpsettings']['addsettings'],
'sections' => [
'section_a' => [
'title' => lng('admin.phpsettings.addsettings'),
'image' => 'icons/phpsettings_add.png',
'fields' => array(
'description' => array(
'label' => $lng['admin']['phpsettings']['description'],
'fields' => [
'description' => [
'label' => lng('admin.phpsettings.description'),
'type' => 'text',
'maxlength' => 50
),
'binary' => array(
'visible' => \Froxlor\Settings::Get('system.mod_fcgid') == 1,
'label' => $lng['admin']['phpsettings']['binary'],
],
'binary' => [
'visible' => Settings::Get('system.mod_fcgid') == 1,
'label' => lng('admin.phpsettings.binary'),
'type' => 'text',
'maxlength' => 255,
'value' => '/usr/bin/php-cgi'
),
'fpmconfig' => array(
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') == 1,
'label' => $lng['admin']['phpsettings']['fpmdesc'],
],
'fpmconfig' => [
'visible' => Settings::Get('phpfpm.enabled') == 1,
'label' => lng('admin.phpsettings.fpmdesc'),
'type' => 'select',
'select_var' => $fpmconfigs,
'selected' => 1
),
'file_extensions' => array(
'visible' => \Froxlor\Settings::Get('system.mod_fcgid') == 1,
'label' => $lng['admin']['phpsettings']['file_extensions'],
'desc' => $lng['admin']['phpsettings']['file_extensions_note'],
],
'file_extensions' => [
'visible' => Settings::Get('system.mod_fcgid') == 1,
'label' => lng('admin.phpsettings.file_extensions'),
'desc' => lng('admin.phpsettings.file_extensions_note'),
'type' => 'text',
'maxlength' => 255,
'value' => 'php'
),
'mod_fcgid_starter' => array(
'visible' => \Froxlor\Settings::Get('system.mod_fcgid') == 1,
'label' => $lng['admin']['mod_fcgid_starter']['title'],
],
'mod_fcgid_starter' => [
'visible' => Settings::Get('system.mod_fcgid') == 1,
'label' => lng('admin.mod_fcgid_starter.title'),
'type' => 'number'
),
'mod_fcgid_maxrequests' => array(
'visible' => \Froxlor\Settings::Get('system.mod_fcgid') == 1,
'label' => $lng['admin']['mod_fcgid_maxrequests']['title'],
],
'mod_fcgid_maxrequests' => [
'visible' => Settings::Get('system.mod_fcgid') == 1,
'label' => lng('admin.mod_fcgid_maxrequests.title'),
'type' => 'number'
),
'mod_fcgid_umask' => array(
'visible' => \Froxlor\Settings::Get('system.mod_fcgid') == 1,
'label' => $lng['admin']['mod_fcgid_umask']['title'],
],
'mod_fcgid_umask' => [
'visible' => Settings::Get('system.mod_fcgid') == 1,
'label' => lng('admin.mod_fcgid_umask.title'),
'type' => 'text',
'maxlength' => 3,
'value' => '022'
),
'phpfpm_enable_slowlog' => array(
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') == 1,
'label' => $lng['admin']['phpsettings']['enable_slowlog'],
],
'phpfpm_enable_slowlog' => [
'visible' => Settings::Get('phpfpm.enabled') == 1,
'label' => lng('admin.phpsettings.enable_slowlog'),
'type' => 'checkbox',
'value' => '1',
'checked' => false
),
'phpfpm_reqtermtimeout' => array(
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') == 1,
'label' => $lng['admin']['phpsettings']['request_terminate_timeout'],
],
'phpfpm_reqtermtimeout' => [
'visible' => Settings::Get('phpfpm.enabled') == 1,
'label' => lng('admin.phpsettings.request_terminate_timeout'),
'type' => 'text',
'maxlength' => 10,
'value' => '60s'
),
'phpfpm_reqslowtimeout' => array(
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') == 1,
'label' => $lng['admin']['phpsettings']['request_slowlog_timeout'],
],
'phpfpm_reqslowtimeout' => [
'visible' => Settings::Get('phpfpm.enabled') == 1,
'label' => lng('admin.phpsettings.request_slowlog_timeout'),
'type' => 'text',
'maxlength' => 10,
'value' => '5s'
),
'phpfpm_pass_authorizationheader' => array(
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') == 1,
'label' => $lng['admin']['phpsettings']['pass_authorizationheader'],
],
'phpfpm_pass_authorizationheader' => [
'visible' => Settings::Get('phpfpm.enabled') == 1,
'label' => lng('admin.phpsettings.pass_authorizationheader'),
'type' => 'checkbox',
'value' => '1',
'checked' => false
),
'override_fpmconfig' => array(
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') == 1,
'label' => $lng['serversettings']['phpfpm_settings']['override_fpmconfig'],
],
'override_fpmconfig' => [
'visible' => Settings::Get('phpfpm.enabled') == 1,
'label' => lng('serversettings.phpfpm_settings.override_fpmconfig'),
'type' => 'checkbox',
'value' => '1',
'checked' => false
),
'pm' => array(
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') == 1,
'label' => $lng['serversettings']['phpfpm_settings']['pm'],
'desc' => $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
],
'pm' => [
'visible' => Settings::Get('phpfpm.enabled') == 1,
'label' => lng('serversettings.phpfpm_settings.pm'),
'desc' => lng('serversettings.phpfpm_settings.override_fpmconfig_addinfo'),
'type' => 'select',
'select_var' => [
'static' => 'static',
'dynamic' => 'dynamic',
'ondemand' => 'ondemand'
]
),
'max_children' => array(
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') == 1,
'label' => $lng['serversettings']['phpfpm_settings']['max_children']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['max_children']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
],
'max_children' => [
'visible' => Settings::Get('phpfpm.enabled') == 1,
'label' => lng('serversettings.phpfpm_settings.max_children.title'),
'desc' => lng('serversettings.phpfpm_settings.max_children.description') . lng('serversettings.phpfpm_settings.override_fpmconfig_addinfo'),
'type' => 'number',
'value' => 1
),
'start_servers' => array(
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') == 1,
'label' => $lng['serversettings']['phpfpm_settings']['start_servers']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['start_servers']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
],
'start_servers' => [
'visible' => Settings::Get('phpfpm.enabled') == 1,
'label' => lng('serversettings.phpfpm_settings.start_servers.title'),
'desc' => lng('serversettings.phpfpm_settings.start_servers.description') . lng('serversettings.phpfpm_settings.override_fpmconfig_addinfo'),
'type' => 'number',
'value' => 20
),
'min_spare_servers' => array(
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') == 1,
'label' => $lng['serversettings']['phpfpm_settings']['min_spare_servers']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['min_spare_servers']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
],
'min_spare_servers' => [
'visible' => Settings::Get('phpfpm.enabled') == 1,
'label' => lng('serversettings.phpfpm_settings.min_spare_servers.title'),
'desc' => lng('serversettings.phpfpm_settings.min_spare_servers.description') . lng('serversettings.phpfpm_settings.override_fpmconfig_addinfo'),
'type' => 'number',
'value' => 5
),
'max_spare_servers' => array(
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') == 1,
'label' => $lng['serversettings']['phpfpm_settings']['max_spare_servers']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['max_spare_servers']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
],
'max_spare_servers' => [
'visible' => Settings::Get('phpfpm.enabled') == 1,
'label' => lng('serversettings.phpfpm_settings.max_spare_servers.title'),
'desc' => lng('serversettings.phpfpm_settings.max_spare_servers.description') . lng('serversettings.phpfpm_settings.override_fpmconfig_addinfo'),
'type' => 'number',
'value' => 35
),
'max_requests' => array(
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') == 1,
'label' => $lng['serversettings']['phpfpm_settings']['max_requests']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['max_requests']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
],
'max_requests' => [
'visible' => Settings::Get('phpfpm.enabled') == 1,
'label' => lng('serversettings.phpfpm_settings.max_requests.title'),
'desc' => lng('serversettings.phpfpm_settings.max_requests.description') . lng('serversettings.phpfpm_settings.override_fpmconfig_addinfo'),
'type' => 'number',
'value' => 0
),
'idle_timeout' => array(
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') == 1,
'label' => $lng['serversettings']['phpfpm_settings']['idle_timeout']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['idle_timeout']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
],
'idle_timeout' => [
'visible' => Settings::Get('phpfpm.enabled') == 1,
'label' => lng('serversettings.phpfpm_settings.idle_timeout.title'),
'desc' => lng('serversettings.phpfpm_settings.idle_timeout.description') . lng('serversettings.phpfpm_settings.override_fpmconfig_addinfo'),
'type' => 'number',
'value' => 10
),
'limit_extensions' => array(
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') == 1,
'label' => $lng['serversettings']['phpfpm_settings']['limit_extensions']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['limit_extensions']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
],
'limit_extensions' => [
'visible' => Settings::Get('phpfpm.enabled') == 1,
'label' => lng('serversettings.phpfpm_settings.limit_extensions.title'),
'desc' => lng('serversettings.phpfpm_settings.limit_extensions.description') . lng('serversettings.phpfpm_settings.override_fpmconfig_addinfo'),
'type' => 'text',
'value' => '.php'
),
'phpsettings' => array(
'label' => $lng['admin']['phpsettings']['phpinisettings'],
],
'phpsettings' => [
'label' => lng('admin.phpsettings.phpinisettings'),
'type' => 'textarea',
'cols' => 80,
'rows' => 20,
'value' => $result['phpsettings']
),
'allow_all_customers' => array(
'label' => $lng['serversettings']['phpfpm_settings']['allow_all_customers']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['allow_all_customers']['description'],
],
'allow_all_customers' => [
'label' => lng('serversettings.phpfpm_settings.allow_all_customers.title'),
'desc' => lng('serversettings.phpfpm_settings.allow_all_customers.description'),
'type' => 'checkbox',
'value' => '1',
'checked' => false
)
)
)
)
)
);
]
]
]
]
]
];

View File

@@ -4,111 +4,122 @@
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
return array(
'phpconfig_edit' => array(
'title' => $lng['admin']['phpsettings']['editsettings'],
use Froxlor\Settings;
return [
'phpconfig_edit' => [
'title' => lng('admin.phpsettings.editsettings'),
'image' => 'fa-solid fa-pen',
'self_overview' => ['section' => 'phpsettings', 'page' => 'overview'],
'sections' => array(
'section_a' => array(
'title' => $lng['admin']['phpsettings']['editsettings'],
'sections' => [
'section_a' => [
'title' => lng('admin.phpsettings.editsettings'),
'image' => 'icons/phpsettings_edit.png',
'fields' => array(
'description' => array(
'label' => $lng['admin']['phpsettings']['description'],
'fields' => [
'description' => [
'label' => lng('admin.phpsettings.description'),
'type' => 'text',
'maxlength' => 50,
'value' => $result['description']
),
'binary' => array(
'visible' => \Froxlor\Settings::Get('system.mod_fcgid') == 1,
'label' => $lng['admin']['phpsettings']['binary'],
],
'binary' => [
'visible' => Settings::Get('system.mod_fcgid') == 1,
'label' => lng('admin.phpsettings.binary'),
'type' => 'text',
'maxlength' => 255,
'value' => $result['binary']
),
'fpmconfig' => array(
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') == 1,
'label' => $lng['admin']['phpsettings']['fpmdesc'],
],
'fpmconfig' => [
'visible' => Settings::Get('phpfpm.enabled') == 1,
'label' => lng('admin.phpsettings.fpmdesc'),
'type' => 'select',
'select_var' => $fpmconfigs,
'selected' => $result['fpmsettingid']
),
'file_extensions' => array(
'visible' => \Froxlor\Settings::Get('system.mod_fcgid') == 1,
'label' => $lng['admin']['phpsettings']['file_extensions'],
'desc' => $lng['admin']['phpsettings']['file_extensions_note'],
],
'file_extensions' => [
'visible' => Settings::Get('system.mod_fcgid') == 1,
'label' => lng('admin.phpsettings.file_extensions'),
'desc' => lng('admin.phpsettings.file_extensions_note'),
'type' => 'text',
'maxlength' => 255,
'value' => $result['file_extensions']
),
'mod_fcgid_starter' => array(
'visible' => \Froxlor\Settings::Get('system.mod_fcgid') == 1,
'label' => $lng['admin']['mod_fcgid_starter']['title'],
],
'mod_fcgid_starter' => [
'visible' => Settings::Get('system.mod_fcgid') == 1,
'label' => lng('admin.mod_fcgid_starter.title'),
'type' => 'number',
'value' => ((int) $result['mod_fcgid_starter'] != -1 ? $result['mod_fcgid_starter'] : '')
),
'mod_fcgid_maxrequests' => array(
'visible' => \Froxlor\Settings::Get('system.mod_fcgid') == 1,
'label' => $lng['admin']['mod_fcgid_maxrequests']['title'],
'value' => ((int)$result['mod_fcgid_starter'] != -1 ? $result['mod_fcgid_starter'] : '')
],
'mod_fcgid_maxrequests' => [
'visible' => Settings::Get('system.mod_fcgid') == 1,
'label' => lng('admin.mod_fcgid_maxrequests.title'),
'type' => 'number',
'value' => ((int) $result['mod_fcgid_maxrequests'] != -1 ? $result['mod_fcgid_maxrequests'] : '')
),
'mod_fcgid_umask' => array(
'visible' => \Froxlor\Settings::Get('system.mod_fcgid') == 1,
'label' => $lng['admin']['mod_fcgid_umask']['title'],
'value' => ((int)$result['mod_fcgid_maxrequests'] != -1 ? $result['mod_fcgid_maxrequests'] : '')
],
'mod_fcgid_umask' => [
'visible' => Settings::Get('system.mod_fcgid') == 1,
'label' => lng('admin.mod_fcgid_umask.title'),
'type' => 'text',
'maxlength' => 3,
'value' => $result['mod_fcgid_umask']
),
'phpfpm_enable_slowlog' => array(
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') == 1,
'label' => $lng['admin']['phpsettings']['enable_slowlog'],
],
'phpfpm_enable_slowlog' => [
'visible' => Settings::Get('phpfpm.enabled') == 1,
'label' => lng('admin.phpsettings.enable_slowlog'),
'type' => 'checkbox',
'value' => '1',
'checked' => $result['fpm_slowlog']
),
'phpfpm_reqtermtimeout' => array(
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') == 1,
'label' => $lng['admin']['phpsettings']['request_terminate_timeout'],
],
'phpfpm_reqtermtimeout' => [
'visible' => Settings::Get('phpfpm.enabled') == 1,
'label' => lng('admin.phpsettings.request_terminate_timeout'),
'type' => 'text',
'maxlength' => 10,
'value' => $result['fpm_reqterm']
),
'phpfpm_reqslowtimeout' => array(
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') == 1,
'label' => $lng['admin']['phpsettings']['request_slowlog_timeout'],
],
'phpfpm_reqslowtimeout' => [
'visible' => Settings::Get('phpfpm.enabled') == 1,
'label' => lng('admin.phpsettings.request_slowlog_timeout'),
'type' => 'text',
'maxlength' => 10,
'value' => $result['fpm_reqslow']
),
'phpfpm_pass_authorizationheader' => array(
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') == 1,
'label' => $lng['admin']['phpsettings']['pass_authorizationheader'],
],
'phpfpm_pass_authorizationheader' => [
'visible' => Settings::Get('phpfpm.enabled') == 1,
'label' => lng('admin.phpsettings.pass_authorizationheader'),
'type' => 'checkbox',
'value' => '1',
'checked' => $result['pass_authorizationheader']
),
'override_fpmconfig' => array(
'label' => $lng['serversettings']['phpfpm_settings']['override_fpmconfig'],
],
'override_fpmconfig' => [
'label' => lng('serversettings.phpfpm_settings.override_fpmconfig'),
'type' => 'checkbox',
'value' => '1',
'checked' => $result['override_fpmconfig']
),
'pm' => array(
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') == 1,
'label' => $lng['serversettings']['phpfpm_settings']['pm'],
'desc' => $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
],
'pm' => [
'visible' => Settings::Get('phpfpm.enabled') == 1,
'label' => lng('serversettings.phpfpm_settings.pm'),
'desc' => lng('serversettings.phpfpm_settings.override_fpmconfig_addinfo'),
'type' => 'select',
'select_var' => [
'static' => 'static',
@@ -116,72 +127,72 @@ return array(
'ondemand' => 'ondemand'
],
'selected' => $result['pm']
),
'max_children' => array(
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') == 1,
'label' => $lng['serversettings']['phpfpm_settings']['max_children']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['max_children']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
],
'max_children' => [
'visible' => Settings::Get('phpfpm.enabled') == 1,
'label' => lng('serversettings.phpfpm_settings.max_children.title'),
'desc' => lng('serversettings.phpfpm_settings.max_children.description') . lng('serversettings.phpfpm_settings.override_fpmconfig_addinfo'),
'type' => 'number',
'value' => $result['max_children']
),
'start_servers' => array(
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') == 1,
'label' => $lng['serversettings']['phpfpm_settings']['start_servers']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['start_servers']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
],
'start_servers' => [
'visible' => Settings::Get('phpfpm.enabled') == 1,
'label' => lng('serversettings.phpfpm_settings.start_servers.title'),
'desc' => lng('serversettings.phpfpm_settings.start_servers.description') . lng('serversettings.phpfpm_settings.override_fpmconfig_addinfo'),
'type' => 'number',
'value' => $result['start_servers']
),
'min_spare_servers' => array(
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') == 1,
'label' => $lng['serversettings']['phpfpm_settings']['min_spare_servers']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['min_spare_servers']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
],
'min_spare_servers' => [
'visible' => Settings::Get('phpfpm.enabled') == 1,
'label' => lng('serversettings.phpfpm_settings.min_spare_servers.title'),
'desc' => lng('serversettings.phpfpm_settings.min_spare_servers.description') . lng('serversettings.phpfpm_settings.override_fpmconfig_addinfo'),
'type' => 'number',
'value' => $result['min_spare_servers']
),
'max_spare_servers' => array(
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') == 1,
'label' => $lng['serversettings']['phpfpm_settings']['max_spare_servers']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['max_spare_servers']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
],
'max_spare_servers' => [
'visible' => Settings::Get('phpfpm.enabled') == 1,
'label' => lng('serversettings.phpfpm_settings.max_spare_servers.title'),
'desc' => lng('serversettings.phpfpm_settings.max_spare_servers.description') . lng('serversettings.phpfpm_settings.override_fpmconfig_addinfo'),
'type' => 'number',
'value' => $result['max_spare_servers']
),
'max_requests' => array(
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') == 1,
'label' => $lng['serversettings']['phpfpm_settings']['max_requests']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['max_requests']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
],
'max_requests' => [
'visible' => Settings::Get('phpfpm.enabled') == 1,
'label' => lng('serversettings.phpfpm_settings.max_requests.title'),
'desc' => lng('serversettings.phpfpm_settings.max_requests.description') . lng('serversettings.phpfpm_settings.override_fpmconfig_addinfo'),
'type' => 'number',
'value' => $result['max_requests']
),
'idle_timeout' => array(
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') == 1,
'label' => $lng['serversettings']['phpfpm_settings']['idle_timeout']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['idle_timeout']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
],
'idle_timeout' => [
'visible' => Settings::Get('phpfpm.enabled') == 1,
'label' => lng('serversettings.phpfpm_settings.idle_timeout.title'),
'desc' => lng('serversettings.phpfpm_settings.idle_timeout.description') . lng('serversettings.phpfpm_settings.override_fpmconfig_addinfo'),
'type' => 'number',
'value' => $result['idle_timeout']
),
'limit_extensions' => array(
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') == 1,
'label' => $lng['serversettings']['phpfpm_settings']['limit_extensions']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['limit_extensions']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
],
'limit_extensions' => [
'visible' => Settings::Get('phpfpm.enabled') == 1,
'label' => lng('serversettings.phpfpm_settings.limit_extensions.title'),
'desc' => lng('serversettings.phpfpm_settings.limit_extensions.description') . lng('serversettings.phpfpm_settings.override_fpmconfig_addinfo'),
'type' => 'text',
'value' => $result['limit_extensions']
),
'phpsettings' => array(
'label' => $lng['admin']['phpsettings']['phpinisettings'],
],
'phpsettings' => [
'label' => lng('admin.phpsettings.phpinisettings'),
'type' => 'textarea',
'cols' => 80,
'rows' => 20,
'value' => $result['phpsettings']
),
'allow_all_customers' => array(
'label' => $lng['serversettings']['phpfpm_settings']['allow_all_customers']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['allow_all_customers']['description'],
],
'allow_all_customers' => [
'label' => lng('serversettings.phpfpm_settings.allow_all_customers.title'),
'desc' => lng('serversettings.phpfpm_settings.allow_all_customers.description'),
'type' => 'checkbox',
'value' => '1',
'checked' => false
)
)
)
)
)
);
]
]
]
]
]
];

View File

@@ -4,38 +4,47 @@
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
return array(
'plans_add' => array(
'title' => $lng['admin']['plans']['add'],
return [
'plans_add' => [
'title' => lng('admin.plans.add'),
'image' => 'fa-solid fa-plus',
'sections' => array(
'section_a' => array(
'title' => $lng['admin']['plans']['plan_details'],
'sections' => [
'section_a' => [
'title' => lng('admin.plans.plan_details'),
'image' => 'icons/templates_add_big.png',
'fields' => array(
'name' => array(
'label' => $lng['admin']['plans']['name'],
'fields' => [
'name' => [
'label' => lng('admin.plans.name'),
'type' => 'text',
'mandatory' => true
),
'description' => array(
'label' => $lng['admin']['plans']['description'],
],
'description' => [
'label' => lng('admin.plans.description'),
'type' => 'textarea',
'cols' => 60,
'rows' => 12
)
)
)
)
)
);
]
]
]
]
]
];

View File

@@ -4,40 +4,49 @@
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
return array(
'plans_edit' => array(
'title' => $lng['admin']['plans']['edit'],
return [
'plans_edit' => [
'title' => lng('admin.plans.edit'),
'image' => 'fa-solid fa-pen',
'sections' => array(
'section_a' => array(
'title' => $lng['admin']['plans']['plan_details'],
'sections' => [
'section_a' => [
'title' => lng('admin.plans.plan_details'),
'image' => 'icons/templates_edit_big.png',
'fields' => array(
'name' => array(
'label' => $lng['admin']['plans']['name'],
'fields' => [
'name' => [
'label' => lng('admin.plans.name'),
'type' => 'text',
'value' => $result['name'],
'mandatory' => true
),
'description' => array(
'label' => $lng['admin']['plans']['description'],
],
'description' => [
'label' => lng('admin.plans.description'),
'type' => 'textarea',
'cols' => 60,
'rows' => 12,
'value' => $result['description']
)
)
)
)
)
);
]
]
]
]
]
];

View File

@@ -4,30 +4,39 @@
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
return array(
'settings_import' => array(
'title' => $lng['admin']['configfiles']['importexport'],
return [
'settings_import' => [
'title' => lng('admin.configfiles.importexport'),
'image' => 'fa-solid fa-file-import',
'sections' => array(
'section_a' => array(
'fields' => array(
'import_file' => array(
'sections' => [
'section_a' => [
'fields' => [
'import_file' => [
'label' => 'Chose file for import',
'type' => 'file',
'mandatory' => true
)
)
)
)
)
);
]
]
]
]
]
];

View File

@@ -6,59 +6,68 @@ use Froxlor\Settings;
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
return array(
'mailtest' => array(
'title' => $lng['admin']['testmail'],
return [
'mailtest' => [
'title' => lng('admin.testmail'),
'image' => 'fa-solid fa-paper-plane',
'sections' => array(
'section_a' => array(
'fields' => array(
'smtp_user' => array(
'label' => $lng['serversettings']['mail_smtp_user'],
'sections' => [
'section_a' => [
'fields' => [
'smtp_user' => [
'label' => lng('serversettings.mail_smtp_user'),
'type' => 'label',
'value' => (empty(Settings::Get('system.mail_smtp_user')) ? $lng['panel']['unspecified'] : Settings::Get('system.mail_smtp_user'))
),
'smtp_host' => array(
'label' => $lng['serversettings']['mail_smtp_host'],
'value' => (empty(Settings::Get('system.mail_smtp_user')) ? lng('panel.unspecified') : Settings::Get('system.mail_smtp_user'))
],
'smtp_host' => [
'label' => lng('serversettings.mail_smtp_host'),
'type' => 'label',
'value' => (empty(Settings::Get('system.mail_smtp_host')) ? $lng['panel']['unspecified'] : Settings::Get('system.mail_smtp_host'))
),
'smtp_port' => array(
'label' => $lng['serversettings']['mail_smtp_port'],
'value' => (empty(Settings::Get('system.mail_smtp_host')) ? lng('panel.unspecified') : Settings::Get('system.mail_smtp_host'))
],
'smtp_port' => [
'label' => lng('serversettings.mail_smtp_port'),
'type' => 'label',
'value' => (empty(Settings::Get('system.mail_smtp_port')) ? $lng['panel']['unspecified'] : Settings::Get('system.mail_smtp_port'))
),
'smtp_auth' => array(
'label' => $lng['serversettings']['mail_smtp_auth'],
'value' => (empty(Settings::Get('system.mail_smtp_port')) ? lng('panel.unspecified') : Settings::Get('system.mail_smtp_port'))
],
'smtp_auth' => [
'label' => lng('serversettings.mail_smtp_auth'),
'type' => 'checkbox',
'value' => 1,
'checked' => (bool) Settings::Get('system.mail_use_smtp'),
'checked' => (bool)Settings::Get('system.mail_use_smtp'),
'disabled' => true
),
'smtp_tls' => array(
'label' => $lng['serversettings']['mail_smtp_usetls'],
],
'smtp_tls' => [
'label' => lng('serversettings.mail_smtp_usetls'),
'type' => 'checkbox',
'value' => 1,
'checked' => (bool) Settings::Get('system.mail_smtp_usetls'),
'checked' => (bool)Settings::Get('system.mail_smtp_usetls'),
'disabled' => true
),
'test_addr' => array(
'label' => $lng['admin']['smtptestaddr'],
],
'test_addr' => [
'label' => lng('admin.smtptestaddr'),
'type' => 'email',
'mandatory' => true
)
)
)
)
)
);
]
]
]
]
]
];

View File

@@ -4,67 +4,75 @@
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
return array(
'filetemplate_add' => array(
'title' => $lng['admin']['templates']['template_add'],
return [
'filetemplate_add' => [
'title' => lng('admin.templates.template_add'),
'image' => 'fa-solid fa-plus',
'sections' => array(
'section_a' => array(
'title' => $lng['admin']['templates']['template_add'],
'sections' => [
'section_a' => [
'title' => lng('admin.templates.template_add'),
'image' => 'icons/templates_add.png',
'fields' => array(
'template' => array(
'label' => $lng['admin']['templates']['action'],
'fields' => [
'template' => [
'label' => lng('admin.templates.action'),
'type' => 'select',
'select_var' => $free_templates
),
'filecontent' => array(
'label' => $lng['admin']['templates']['filecontent'],
],
'filecontent' => [
'label' => lng('admin.templates.filecontent'),
'type' => 'textarea',
'cols' => 60,
'rows' => 12
),
'filesend' => array(
],
'filesend' => [
'type' => 'hidden',
'value' => 'filesend'
)
)
)
)
),
]
]
]
]
],
'filetemplate_replacers' => [
'replacers' => [
[
'var' => 'SERVERNAME',
'description' => $lng['admin']['templates']['SERVERNAME']
'description' => lng('admin.templates.SERVERNAME')
],
[
'var' => 'CUSTOMER',
'description' => $lng['admin']['templates']['CUSTOMER']
'description' => lng('admin.templates.CUSTOMER')
],
[
'var' => 'ADMIN',
'description' => $lng['admin']['templates']['ADMIN']
'description' => lng('admin.templates.ADMIN')
],
[
'var' => 'CUSTOMER_EMAIL',
'description' => $lng['admin']['templates']['CUSTOMER_EMAIL']
'description' => lng('admin.templates.CUSTOMER_EMAIL')
],
[
'var' => 'ADMIN_EMAIL',
'description' => $lng['admin']['templates']['ADMIN_EMAIL']
'description' => lng('admin.templates.ADMIN_EMAIL')
]
]
]
);
];

View File

@@ -4,68 +4,77 @@
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
return array(
'filetemplate_edit' => array(
'title' => $lng['admin']['templates']['template_edit'],
return [
'filetemplate_edit' => [
'title' => lng('admin.templates.template_edit'),
'image' => 'fa-solid fa-pen',
'sections' => array(
'section_a' => array(
'title' => $lng['admin']['templates']['template_edit'],
'sections' => [
'section_a' => [
'title' => lng('admin.templates.template_edit'),
'image' => 'icons/templates_edit.png',
'fields' => array(
'template' => array(
'label' => $lng['admin']['templates']['action'],
'fields' => [
'template' => [
'label' => lng('admin.templates.action'),
'type' => 'hidden',
'value' => $lng['admin']['templates'][$row['varname']],
'display' => $lng['admin']['templates'][$row['varname']]
),
'filecontent' => array(
'label' => $lng['admin']['templates']['filecontent'],
'value' => lng('admin.templates.' . $row['varname']),
'display' => lng('admin.templates.' . $row['varname'])
],
'filecontent' => [
'label' => lng('admin.templates.filecontent'),
'type' => 'textarea',
'cols' => 60,
'rows' => 12,
'value' => $row['value']
),
'filesend' => array(
],
'filesend' => [
'type' => 'hidden',
'value' => 'filesend'
)
)
)
)
),
]
]
]
]
],
'filetemplate_replacers' => [
'replacers' => [
[
'var' => 'SERVERNAME',
'description' => $lng['admin']['templates']['SERVERNAME']
'description' => lng('admin.templates.SERVERNAME')
],
[
'var' => 'CUSTOMER',
'description' => $lng['admin']['templates']['CUSTOMER']
'description' => lng('admin.templates.CUSTOMER')
],
[
'var' => 'ADMIN',
'description' => $lng['admin']['templates']['ADMIN']
'description' => lng('admin.templates.ADMIN')
],
[
'var' => 'CUSTOMER_EMAIL',
'description' => $lng['admin']['templates']['CUSTOMER_EMAIL']
'description' => lng('admin.templates.CUSTOMER_EMAIL')
],
[
'var' => 'ADMIN_EMAIL',
'description' => $lng['admin']['templates']['ADMIN_EMAIL']
'description' => lng('admin.templates.ADMIN_EMAIL')
]
]
]
);
];

View File

@@ -4,52 +4,61 @@
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
return array(
'template_add' => array(
'title' => $lng['admin']['templates']['template_add'],
return [
'template_add' => [
'title' => lng('admin.templates.template_add'),
'image' => 'fa-solid fa-plus',
'sections' => array(
'section_a' => array(
'title' => $lng['admin']['templates']['template_add'],
'sections' => [
'section_a' => [
'title' => lng('admin.templates.template_add'),
'image' => 'icons/templates_add.png',
'fields' => array(
'language' => array(
'label' => $lng['login']['language'],
'fields' => [
'language' => [
'label' => lng('login.language'),
'type' => 'hidden',
'value' => $language,
'display' => $language
),
'template' => array(
'label' => $lng['admin']['templates']['action'],
],
'template' => [
'label' => lng('admin.templates.action'),
'type' => 'hidden',
'value' => $template,
'display' => $lng['admin']['templates'][$template]
),
'subject' => array(
'label' => $lng['admin']['templates']['subject'],
'display' => lng('admin.templates.' . $template)
],
'subject' => [
'label' => lng('admin.templates.subject'),
'type' => 'text',
'value' => $subject
),
'mailbody' => array(
'label' => $lng['admin']['templates']['mailbody'],
],
'mailbody' => [
'label' => lng('admin.templates.mailbody'),
'type' => 'textarea',
'value' => $body,
'cols' => 60,
'rows' => 12
)
)
)
)
),
]
]
]
]
],
'template_replacers' => include __DIR__ . '/template.replacers.php'
);
];

View File

@@ -4,60 +4,69 @@
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
return array(
'template_edit' => array(
'title' => $lng['admin']['templates']['template_edit'],
return [
'template_edit' => [
'title' => lng('admin.templates.template_edit'),
'image' => 'fa-solid fa-pen',
'sections' => array(
'section_a' => array(
'title' => $lng['admin']['templates']['template_edit'],
'sections' => [
'section_a' => [
'title' => lng('admin.templates.template_edit'),
'image' => 'icons/templates_edit.png',
'fields' => array(
'language' => array(
'label' => $lng['login']['language'],
'fields' => [
'language' => [
'label' => lng('login.language'),
'type' => 'hidden',
'value' => $language,
'display' => $language
),
'template' => array(
'label' => $lng['admin']['templates']['action'],
],
'template' => [
'label' => lng('admin.templates.action'),
'type' => 'hidden',
'value' => $template_name,
'display' => $template_name
),
'subject' => array(
'label' => $lng['admin']['templates']['subject'],
],
'subject' => [
'label' => lng('admin.templates.subject'),
'type' => 'text',
'value' => $subject
),
'mailbody' => array(
'label' => $lng['admin']['templates']['mailbody'],
],
'mailbody' => [
'label' => lng('admin.templates.mailbody'),
'type' => 'textarea',
'cols' => 60,
'rows' => 12,
'value' => $mailbody
),
'subjectid' => array(
],
'subjectid' => [
'type' => 'hidden',
'value' => $subjectid
),
'mailbodyid' => array(
],
'mailbodyid' => [
'type' => 'hidden',
'value' => $mailbodyid
)
)
)
)
),
]
]
]
]
],
'template_replacers' => include __DIR__ . '/template.replacers.php'
);
];

View File

@@ -4,131 +4,139 @@
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
return [
'replacers' => [
[
'var' => 'SALUTATION',
'description' => $lng['admin']['templates']['SALUTATION']
'description' => lng('admin.templates.SALUTATION')
],
[
'var' => 'FIRSTNAME',
'description' => $lng['admin']['templates']['FIRSTNAME']
'description' => lng('admin.templates.FIRSTNAME')
],
[
'var' => 'NAME',
'description' => $lng['admin']['templates']['NAME']
'description' => lng('admin.templates.NAME')
],
[
'var' => 'COMPANY',
'description' => $lng['admin']['templates']['COMPANY']
'description' => lng('admin.templates.COMPANY')
],
[
'var' => 'CUSTOMER_NO',
'description' => $lng['admin']['templates']['CUSTOMER_NO']
'description' => lng('admin.templates.CUSTOMER_NO')
],
[
'var' => 'USERNAME',
'description' => $lng['admin']['templates']['USERNAME'],
'description' => lng('admin.templates.USERNAME'),
'visible' => $template == 'createcustomer' || $template == 'password_reset'
],
[
'var' => 'PASSWORD',
'description' => $lng['admin']['templates']['PASSWORD'],
'description' => lng('admin.templates.PASSWORD'),
'visible' => $template == 'createcustomer'
],
[
'var' => 'EMAIL',
'description' => $lng['admin']['templates']['EMAIL'],
'description' => lng('admin.templates.EMAIL'),
'visible' => $template == 'pop_success'
],
[
'var' => 'PASSWORD',
'description' => $lng['admin']['templates']['EMAIL_PASSWORD'],
'description' => lng('admin.templates.EMAIL_PASSWORD'),
'visible' => $template == 'pop_success'
],
[
'var' => 'LINK',
'description' => $lng['admin']['templates']['LINK'],
'description' => lng('admin.templates.LINK'),
'visible' => $template == 'password_reset'
],
[
'var' => 'TRAFFIC',
'description' => $lng['admin']['templates']['TRAFFIC'],
'description' => lng('admin.templates.TRAFFIC'),
'visible' => $template == 'trafficmaxpercent'
],
[
'var' => 'TRAFFICUSED',
'description' => $lng['admin']['templates']['TRAFFICUSED'],
'description' => lng('admin.templates.TRAFFICUSED'),
'visible' => $template == 'trafficmaxpercent'
],
[
'var' => 'DISKAVAILABLE',
'description' => $lng['admin']['templates']['DISKAVAILABLE'],
'description' => lng('admin.templates.DISKAVAILABLE'),
'visible' => $template == 'diskmaxpercent'
],
[
'var' => 'DISKUSED',
'description' => $lng['admin']['templates']['DISKUSED'],
'description' => lng('admin.templates.DISKUSED'),
'visible' => $template == 'diskmaxpercent'
],
[
'var' => 'MAX_PERCENT',
'description' => $lng['admin']['templates']['MAX_PERCENT'],
'description' => lng('admin.templates.MAX_PERCENT'),
'visible' => $template == 'trafficmaxpercent' || $template == 'diskmaxpercent'
],
[
'var' => 'USAGE_PERCENT',
'description' => $lng['admin']['templates']['USAGE_PERCENT'],
'description' => lng('admin.templates.USAGE_PERCENT'),
'visible' => $template == 'trafficmaxpercent' || $template == 'diskmaxpercent'
],
[
'var' => 'DB_NAME',
'description' => $lng['admin']['templates']['DB_NAME'],
'description' => lng('admin.templates.DB_NAME'),
'visible' => $template == 'new_database_by_customer'
],
[
'var' => 'DB_PASS',
'description' => $lng['admin']['templates']['DB_PASS'],
'description' => lng('admin.templates.DB_PASS'),
'visible' => $template == 'new_database_by_customer'
],
[
'var' => 'DB_DESC',
'description' => $lng['admin']['templates']['DB_DESC'],
'description' => lng('admin.templates.DB_DESC'),
'visible' => $template == 'new_database_by_customer'
],
[
'var' => 'DB_SRV',
'description' => $lng['admin']['templates']['DB_SRV'],
'description' => lng('admin.templates.DB_SRV'),
'visible' => $template == 'new_database_by_customer'
],
[
'var' => 'PMA_URI',
'description' => $lng['admin']['templates']['PMA_URI'],
'description' => lng('admin.templates.PMA_URI'),
'visible' => $template == 'new_database_by_customer'
],
[
'var' => 'USR_NAME',
'description' => $lng['admin']['templates']['USR_NAME'],
'description' => lng('admin.templates.USR_NAME'),
'visible' => $template == 'new_ftpaccount_by_customer'
],
[
'var' => 'USR_PASS',
'description' => $lng['admin']['templates']['USR_PASS'],
'description' => lng('admin.templates.USR_PASS'),
'visible' => $template == 'new_ftpaccount_by_customer'
],
[
'var' => 'USR_PATH',
'description' => $lng['admin']['templates']['USR_PATH'],
'description' => lng('admin.templates.USR_PATH'),
'visible' => $template == 'new_ftpaccount_by_customer'
]
]

View File

@@ -4,31 +4,39 @@
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
use Froxlor\Settings;
return array(
'domain_add' => array(
'title' => $lng['domains']['subdomain_add'],
return [
'domain_add' => [
'title' => lng('domains.subdomain_add'),
'image' => 'fa-solid fa-plus',
'self_overview' => ['section' => 'domains', 'page' => 'domains'],
'sections' => array(
'section_a' => array(
'title' => $lng['domains']['subdomain_add'],
'sections' => [
'section_a' => [
'title' => lng('domains.subdomain_add'),
'image' => 'icons/domain_add.png',
'fields' => array(
'subdomain' => array(
'label' => $lng['domains']['domainname'],
'fields' => [
'subdomain' => [
'label' => lng('domains.domainname'),
'type' => 'text',
'next_to' => [
'domain' => [
@@ -37,110 +45,110 @@ return array(
'select_var' => $domains
]
]
),
'alias' => array(
'label' => $lng['domains']['aliasdomain'],
],
'alias' => [
'label' => lng('domains.aliasdomain'),
'type' => 'select',
'select_var' => $aliasdomains
),
'path' => array(
'label' => $lng['panel']['path'],
'desc' => (Settings::Get('panel.pathedit') != 'Dropdown' ? $lng['panel']['pathDescriptionSubdomain'] : null),
],
'path' => [
'label' => lng('panel.path'),
'desc' => (Settings::Get('panel.pathedit') != 'Dropdown' ? lng('panel.pathDescriptionSubdomain') : null),
'type' => $pathSelect['type'],
'select_var' => $pathSelect['select_var'] ?? '',
'value' => $pathSelect['value'],
'note' => $pathSelect['note'] ?? '',
),
'url' => array(
],
'url' => [
'visible' => Settings::Get('panel.pathedit') == 'Dropdown',
'label' => $lng['panel']['urloverridespath'],
'label' => lng('panel.urloverridespath'),
'type' => 'text'
),
'redirectcode' => array(
],
'redirectcode' => [
'visible' => Settings::Get('customredirect.enabled') == '1',
'label' => $lng['domains']['redirectifpathisurl'],
'desc' => $lng['domains']['redirectifpathisurlinfo'],
'label' => lng('domains.redirectifpathisurl'),
'desc' => lng('domains.redirectifpathisurlinfo'),
'type' => 'select',
'select_var' => isset($redirectcode) ? $redirectcode : null
),
'selectserveralias' => array(
'label' => $lng['admin']['selectserveralias'],
'desc' => $lng['admin']['selectserveralias_desc'],
],
'selectserveralias' => [
'label' => lng('admin.selectserveralias'),
'desc' => lng('admin.selectserveralias_desc'),
'type' => 'label',
'value' => $lng['customer']['selectserveralias_addinfo']
),
'openbasedir_path' => array(
'label' => $lng['domain']['openbasedirpath'],
'value' => lng('customer.selectserveralias_addinfo')
],
'openbasedir_path' => [
'label' => lng('domain.openbasedirpath'),
'type' => 'select',
'select_var' => $openbasedir
),
'phpsettingid' => array(
'visible' => ((int) Settings::Get('system.mod_fcgid') == 1 || (int) Settings::Get('phpfpm.enabled') == 1) && count($phpconfigs) > 0,
'label' => $lng['admin']['phpsettings']['title'],
],
'phpsettingid' => [
'visible' => ((int)Settings::Get('system.mod_fcgid') == 1 || (int)Settings::Get('phpfpm.enabled') == 1) && count($phpconfigs) > 0,
'label' => lng('admin.phpsettings.title'),
'type' => 'select',
'select_var' => $phpconfigs,
'selected' => (int) Settings::Get('phpfpm.enabled') == 1 ? Settings::Get('phpfpm.defaultini') : Settings::Get('system.mod_fcgid_defaultini')
)
)
),
'section_bssl' => array(
'title' => $lng['admin']['webserversettings_ssl'],
'selected' => (int)Settings::Get('phpfpm.enabled') == 1 ? Settings::Get('phpfpm.defaultini') : Settings::Get('system.mod_fcgid_defaultini')
]
]
],
'section_bssl' => [
'title' => lng('admin.webserversettings_ssl'),
'image' => 'icons/domain_add.png',
'visible' => Settings::Get('system.use_ssl') == '1' && $ssl_ipsandports,
'fields' => array(
'sslenabled' => array(
'label' => $lng['admin']['domain_sslenabled'],
'fields' => [
'sslenabled' => [
'label' => lng('admin.domain_sslenabled'),
'type' => 'checkbox',
'value' => '1',
'checked' => true
),
'ssl_redirect' => array(
'label' => $lng['domains']['ssl_redirect']['title'],
'desc' => $lng['domains']['ssl_redirect']['description'],
],
'ssl_redirect' => [
'label' => lng('domains.ssl_redirect.title'),
'desc' => lng('domains.ssl_redirect.description'),
'type' => 'checkbox',
'value' => '1',
'checked' => false
),
'letsencrypt' => array(
],
'letsencrypt' => [
'visible' => Settings::Get('system.leenabled') == '1',
'label' => $lng['customer']['letsencrypt']['title'],
'desc' => $lng['customer']['letsencrypt']['description'],
'label' => lng('customer.letsencrypt.title'),
'desc' => lng('customer.letsencrypt.description'),
'type' => 'checkbox',
'value' => '1',
'checked' => false
),
'http2' => array(
],
'http2' => [
'visible' => $ssl_ipsandports && Settings::Get('system.webserver') != 'lighttpd' && Settings::Get('system.http2_support') == '1',
'label' => $lng['admin']['domain_http2']['title'],
'desc' => $lng['admin']['domain_http2']['description'],
'label' => lng('admin.domain_http2.title'),
'desc' => lng('admin.domain_http2.description'),
'type' => 'checkbox',
'value' => '1',
'checked' => false
),
'hsts_maxage' => array(
'label' => $lng['admin']['domain_hsts_maxage']['title'],
'desc' => $lng['admin']['domain_hsts_maxage']['description'],
],
'hsts_maxage' => [
'label' => lng('admin.domain_hsts_maxage.title'),
'desc' => lng('admin.domain_hsts_maxage.description'),
'type' => 'number',
'min' => 0,
'max' => 94608000, // 3-years
'value' => 0
),
'hsts_sub' => array(
'label' => $lng['admin']['domain_hsts_incsub']['title'],
'desc' => $lng['admin']['domain_hsts_incsub']['description'],
],
'hsts_sub' => [
'label' => lng('admin.domain_hsts_incsub.title'),
'desc' => lng('admin.domain_hsts_incsub.description'),
'type' => 'checkbox',
'value' => '1',
'checked' => false
),
'hsts_preload' => array(
'label' => $lng['admin']['domain_hsts_preload']['title'],
'desc' => $lng['admin']['domain_hsts_preload']['description'],
],
'hsts_preload' => [
'label' => lng('admin.domain_hsts_preload.title'),
'desc' => lng('admin.domain_hsts_preload.description'),
'type' => 'checkbox',
'value' => '1',
'checked' => false
)
)
)
)
)
);
]
]
]
]
]
];

View File

@@ -4,153 +4,165 @@
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
return array(
'domain_edit' => array(
'title' => $lng['domains']['subdomain_edit'],
use Froxlor\Domain\Domain;
use Froxlor\Settings;
return [
'domain_edit' => [
'title' => lng('domains.subdomain_edit'),
'image' => 'fa-solid fa-pen',
'self_overview' => ['section' => 'domains', 'page' => 'domains'],
'sections' => array(
'section_a' => array(
'title' => $lng['domains']['subdomain_edit'],
'sections' => [
'section_a' => [
'title' => lng('domains.subdomain_edit'),
'image' => 'icons/domain_edit.png',
'fields' => array(
'domain' => array(
'label' => $lng['domains']['domainname'],
'fields' => [
'domain' => [
'label' => lng('domains.domainname'),
'type' => 'label',
'value' => $result['domain']
),
'dns' => array(
'label' => $lng['dns']['destinationip'],
],
'dns' => [
'label' => lng('dns.destinationip'),
'type' => 'itemlist',
'values' => $domainips
),
'alias' => array(
],
'alias' => [
'visible' => $alias_check == '0',
'label' => $lng['domains']['aliasdomain'],
'label' => lng('domains.aliasdomain'),
'type' => 'select',
'select_var' => $domains,
'selected' => $result['aliasdomain']
),
'path' => array(
'label' => $lng['panel']['path'],
'desc' => (\Froxlor\Settings::Get('panel.pathedit') != 'Dropdown' ? $lng['panel']['pathDescriptionSubdomain'] : null) . (isset($pathSelect['note']) ? '<br />' . $pathSelect['value'] : ''),
],
'path' => [
'label' => lng('panel.path'),
'desc' => (Settings::Get('panel.pathedit') != 'Dropdown' ? lng('panel.pathDescriptionSubdomain') : null) . (isset($pathSelect['note']) ? '<br />' . $pathSelect['value'] : ''),
'type' => $pathSelect['type'],
'select_var' => $pathSelect['value'],
'selected' => $pathSelect['value']
),
'url' => array(
'visible' => \Froxlor\Settings::Get('panel.pathedit') == 'Dropdown',
'label' => $lng['panel']['urloverridespath'],
],
'url' => [
'visible' => Settings::Get('panel.pathedit') == 'Dropdown',
'label' => lng('panel.urloverridespath'),
'type' => 'text',
'value' => $urlvalue
),
'redirectcode' => array(
'visible' => \Froxlor\Settings::Get('customredirect.enabled') == '1',
'label' => $lng['domains']['redirectifpathisurl'],
'desc' => $lng['domains']['redirectifpathisurlinfo'],
],
'redirectcode' => [
'visible' => Settings::Get('customredirect.enabled') == '1',
'label' => lng('domains.redirectifpathisurl'),
'desc' => lng('domains.redirectifpathisurlinfo'),
'type' => 'select',
'select_var' => $redirectcode,
'selected' => $def_code
),
'selectserveralias' => array(
],
'selectserveralias' => [
'visible' => ($result['parentdomainid'] == '0' && $userinfo['subdomains'] != '0') || $result['parentdomainid'] != '0',
'label' => $lng['admin']['selectserveralias'],
'desc' => $lng['admin']['selectserveralias_desc'],
'label' => lng('admin.selectserveralias'),
'desc' => lng('admin.selectserveralias_desc'),
'type' => 'select',
'select_var' => $serveraliasoptions,
'selected' => $serveraliasoptions_selected
),
'isemaildomain' => array(
],
'isemaildomain' => [
'visible' => ($result['subcanemaildomain'] == '1' || $result['subcanemaildomain'] == '2') && $result['parentdomainid'] != '0',
'label' => 'Emaildomain',
'type' => 'checkbox',
'value' => '1',
'checked' => $result['isemaildomain']
),
'openbasedir_path' => array(
],
'openbasedir_path' => [
'visible' => $result['openbasedir'] == '1',
'label' => $lng['domain']['openbasedirpath'],
'label' => lng('domain.openbasedirpath'),
'type' => 'select',
'select_var' => $openbasedir,
'selected' => $result['openbasedir_path']
),
'phpsettingid' => array(
'visible' => ((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 || (int) \Froxlor\Settings::Get('phpfpm.enabled') == 1) && count($phpconfigs) > 0,
'label' => $lng['admin']['phpsettings']['title'],
],
'phpsettingid' => [
'visible' => ((int)Settings::Get('system.mod_fcgid') == 1 || (int)Settings::Get('phpfpm.enabled') == 1) && count($phpconfigs) > 0,
'label' => lng('admin.phpsettings.title'),
'type' => 'select',
'select_var' => $phpconfigs,
'selected' => $result['phpsettingid']
)
)
),
'section_bssl' => array(
'title' => $lng['admin']['webserversettings_ssl'],
]
]
],
'section_bssl' => [
'title' => lng('admin.webserversettings_ssl'),
'image' => 'icons/domain_edit.png',
'visible' => \Froxlor\Settings::Get('system.use_ssl') == '1' && $ssl_ipsandports && \Froxlor\Domain\Domain::domainHasSslIpPort($result['id']),
'fields' => array(
'sslenabled' => array(
'label' => $lng['admin']['domain_sslenabled'],
'visible' => Settings::Get('system.use_ssl') == '1' && $ssl_ipsandports && Domain::domainHasSslIpPort($result['id']),
'fields' => [
'sslenabled' => [
'label' => lng('admin.domain_sslenabled'),
'type' => 'checkbox',
'value' => '1',
'checked' => $result['ssl_enabled']
),
'ssl_redirect' => array(
'label' => $lng['domains']['ssl_redirect']['title'],
'desc' => $lng['domains']['ssl_redirect']['description'] . ($result['temporary_ssl_redirect'] > 1 ? $lng['domains']['ssl_redirect_temporarilydisabled'] : ''),
],
'ssl_redirect' => [
'label' => lng('domains.ssl_redirect.title'),
'desc' => lng('domains.ssl_redirect.description') . ($result['temporary_ssl_redirect'] > 1 ? lng('domains.ssl_redirect_temporarilydisabled') : ''),
'type' => 'checkbox',
'value' => '1',
'checked' => $result['ssl_redirect']
),
'letsencrypt' => array(
'visible' => \Froxlor\Settings::Get('system.leenabled') == '1',
'label' => $lng['customer']['letsencrypt']['title'],
'desc' => $lng['customer']['letsencrypt']['description'],
],
'letsencrypt' => [
'visible' => Settings::Get('system.leenabled') == '1',
'label' => lng('customer.letsencrypt.title'),
'desc' => lng('customer.letsencrypt.description'),
'type' => 'checkbox',
'value' => '1',
'checked' => $result['letsencrypt']
),
'http2' => array(
'visible' => $ssl_ipsandports && \Froxlor\Settings::Get('system.webserver') != 'lighttpd' && \Froxlor\Settings::Get('system.http2_support') == '1',
'label' => $lng['admin']['domain_http2']['title'],
'desc' => $lng['admin']['domain_http2']['description'],
],
'http2' => [
'visible' => $ssl_ipsandports && Settings::Get('system.webserver') != 'lighttpd' && Settings::Get('system.http2_support') == '1',
'label' => lng('admin.domain_http2.title'),
'desc' => lng('admin.domain_http2.description'),
'type' => 'checkbox',
'value' => '1',
'checked' => $result['http2']
),
'hsts_maxage' => array(
'label' => $lng['admin']['domain_hsts_maxage']['title'],
'desc' => $lng['admin']['domain_hsts_maxage']['description'],
],
'hsts_maxage' => [
'label' => lng('admin.domain_hsts_maxage.title'),
'desc' => lng('admin.domain_hsts_maxage.description'),
'type' => 'number',
'min' => 0,
'max' => 94608000, // 3-years
'value' => $result['hsts']
),
'hsts_sub' => array(
'label' => $lng['admin']['domain_hsts_incsub']['title'],
'desc' => $lng['admin']['domain_hsts_incsub']['description'],
],
'hsts_sub' => [
'label' => lng('admin.domain_hsts_incsub.title'),
'desc' => lng('admin.domain_hsts_incsub.description'),
'type' => 'checkbox',
'value' => '1',
'checked' => $result['hsts_sub']
),
'hsts_preload' => array(
'label' => $lng['admin']['domain_hsts_preload']['title'],
'desc' => $lng['admin']['domain_hsts_preload']['description'],
],
'hsts_preload' => [
'label' => lng('admin.domain_hsts_preload.title'),
'desc' => lng('admin.domain_hsts_preload.description'),
'type' => 'checkbox',
'value' => '1',
'checked' => $result['hsts_preload']
)
)
)
)
)
);
]
]
]
]
]
];

View File

@@ -4,43 +4,55 @@
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
return array(
'emails_accountchangepasswd' => array(
'title' => $lng['menue']['main']['changepassword'],
use Froxlor\Settings;
use Froxlor\System\Crypt;
return [
'emails_accountchangepasswd' => [
'title' => lng('menue.main.changepassword'),
'image' => 'icons/email_edit.png',
'sections' => array(
'section_a' => array(
'title' => $lng['menue']['main']['changepassword'],
'sections' => [
'section_a' => [
'title' => lng('menue.main.changepassword'),
'image' => 'icons/email_edit.png',
'fields' => array(
'email_full' => array(
'label' => $lng['emails']['emailaddress'],
'fields' => [
'email_full' => [
'label' => lng('emails.emailaddress'),
'type' => 'label',
'value' => $result['email_full']
),
'email_password' => array(
'label' => $lng['login']['password'],
],
'email_password' => [
'label' => lng('login.password'),
'type' => 'password',
'autocomplete' => 'off'
),
'email_password_suggestion' => array(
'label' => $lng['customer']['generated_pwd'],
],
'email_password_suggestion' => [
'label' => lng('customer.generated_pwd'),
'type' => 'text',
'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''),
'value' => \Froxlor\System\Crypt::generatePassword()
)
)
)
)
)
);
'visible' => (Settings::Get('panel.password_regex') == ''),
'value' => Crypt::generatePassword()
]
]
]
]
]
];

View File

@@ -4,37 +4,46 @@
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
return array(
'emails_accountchangequota' => array(
'title' => $lng['emails']['quota_edit'],
return [
'emails_accountchangequota' => [
'title' => lng('emails.quota_edit'),
'image' => 'icons/email_edit.png',
'sections' => array(
'section_a' => array(
'title' => $lng['emails']['quota_edit'],
'sections' => [
'section_a' => [
'title' => lng('emails.quota_edit'),
'image' => 'icons/email_edit.png',
'fields' => array(
'email_full' => array(
'label' => $lng['emails']['emailaddress'],
'fields' => [
'email_full' => [
'label' => lng('emails.emailaddress'),
'type' => 'label',
'value' => $result['email_full']
),
'email_quota' => array(
'label' => $lng['emails']['quota'] . ' (MiB)',
],
'email_quota' => [
'label' => lng('emails.quota') . ' (MiB)',
'type' => 'text',
'value' => $result['quota']
)
)
)
)
)
);
]
]
]
]
]
];

View File

@@ -4,28 +4,37 @@
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
return array(
'emails_add' => array(
'title' => $lng['emails']['emails_add'],
return [
'emails_add' => [
'title' => lng('emails.emails_add'),
'image' => 'fa-solid fa-plus',
'self_overview' => ['section' => 'email', 'page' => 'emails'],
'sections' => array(
'section_a' => array(
'title' => $lng['emails']['emails_add'],
'sections' => [
'section_a' => [
'title' => lng('emails.emails_add'),
'image' => 'icons/email_add.png',
'fields' => array(
'email_part' => array(
'label' => $lng['emails']['emailaddress'],
'fields' => [
'email_part' => [
'label' => lng('emails.emailaddress'),
'type' => 'text',
'next_to' => [
'domain' => [
@@ -34,15 +43,15 @@ return array(
'select_var' => $domains
]
]
),
'iscatchall' => array(
'label' => $lng['emails']['iscatchall'],
],
'iscatchall' => [
'label' => lng('emails.iscatchall'),
'type' => 'checkbox',
'value' => '1',
'checked' => false
)
)
)
)
)
);
]
]
]
]
]
];

View File

@@ -4,58 +4,70 @@
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
return array(
'emails_addaccount' => array(
'title' => $lng['emails']['account_add'],
use Froxlor\Settings;
use Froxlor\System\Crypt;
return [
'emails_addaccount' => [
'title' => lng('emails.account_add'),
'image' => 'fa-solid fa-plus',
'sections' => array(
'section_a' => array(
'title' => $lng['emails']['account_add'],
'sections' => [
'section_a' => [
'title' => lng('emails.account_add'),
'image' => 'icons/email_add.png',
'fields' => array(
'emailaddr' => array(
'label' => $lng['emails']['emailaddress'],
'fields' => [
'emailaddr' => [
'label' => lng('emails.emailaddress'),
'type' => 'label',
'value' => $result['email_full']
),
'email_password' => array(
'label' => $lng['login']['password'],
],
'email_password' => [
'label' => lng('login.password'),
'type' => 'password',
'autocomplete' => 'off',
'next_to' => [
'admin_password_suggestion' => array(
'next_to_prefix' => $lng['customer']['generated_pwd'].':',
'admin_password_suggestion' => [
'next_to_prefix' => lng('customer.generated_pwd') . ':',
'type' => 'text',
'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''),
'value' => \Froxlor\System\Crypt::generatePassword(),
'visible' => (Settings::Get('panel.password_regex') == ''),
'value' => Crypt::generatePassword(),
'readonly' => true
)
]
]
),
'email_quota' => array(
'visible' => \Froxlor\Settings::Get('system.mail_quota_enabled') == '1',
'label' => $lng['emails']['quota'],
],
'email_quota' => [
'visible' => Settings::Get('system.mail_quota_enabled') == '1',
'label' => lng('emails.quota'),
'desc' => "MiB",
'type' => 'number',
'value' => $quota
),
'alternative_email' => array(
'visible' => \Froxlor\Settings::Get('panel.sendalternativemail') == '1',
'label' => $lng['emails']['alternative_emailaddress'],
],
'alternative_email' => [
'visible' => Settings::Get('panel.sendalternativemail') == '1',
'label' => lng('emails.alternative_emailaddress'),
'type' => 'text'
)
)
)
)
)
);
]
]
]
]
]
];

View File

@@ -4,36 +4,45 @@
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
return array(
'emails_addforwarder' => array(
'title' => $lng['emails']['forwarder_add'],
return [
'emails_addforwarder' => [
'title' => lng('emails.forwarder_add'),
'image' => 'fa-solid fa-plus',
'sections' => array(
'section_a' => array(
'title' => $lng['emails']['forwarder_add'],
'sections' => [
'section_a' => [
'title' => lng('emails.forwarder_add'),
'image' => 'icons/autoresponder_add.png',
'fields' => array(
'emailaddr' => array(
'label' => $lng['emails']['from'],
'fields' => [
'emailaddr' => [
'label' => lng('emails.from'),
'type' => 'label',
'value' => $result['email_full']
),
'destination' => array(
'label' => $lng['emails']['to'],
],
'destination' => [
'label' => lng('emails.to'),
'type' => 'email'
)
)
)
)
)
);
]
]
]
]
]
];

View File

@@ -4,109 +4,120 @@
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
use Froxlor\Settings;
return array(
'emails_edit' => array(
'title' => $lng['emails']['emails_edit'],
'title' => lng('emails.emails_edit'),
'image' => 'fa-solid fa-pen',
'self_overview' => ['section' => 'email', 'page' => 'emails'],
'sections' => array(
'section_a' => array(
'title' => $lng['emails']['emails_edit'],
'title' => lng('emails.emails_edit'),
'image' => 'icons/email_edit.png',
'nobuttons' => true,
'fields' => array(
'email_full' => array(
'label' => $lng['emails']['emailaddress'],
'email_full' => [
'label' => lng('emails.emailaddress'),
'type' => 'label',
'value' => $result['email_full']
),
'account_yes' => array(
'visible' => (int) $result['popaccountid'] != 0,
'label' => $lng['emails']['account'],
],
'account_yes' => [
'visible' => (int)$result['popaccountid'] != 0,
'label' => lng('emails.account'),
'type' => 'label',
'value' => $lng['panel']['yes'],
'value' => lng('panel.yes'),
'next_to' => [
'edit_link' => [
'type' => 'link',
'href' => $filename . '?page=accounts&amp;action=changepw&amp;id=' . $result['id'],
'label' => $lng['menue']['main']['changepassword'],
'label' => lng('menue.main.changepassword'),
'classes' => 'btn btn-sm btn-secondary'
],
'del_link' => [
'type' => 'link',
'href' => $filename . '?page=accounts&amp;action=delete&amp;id=' . $result['id'],
'label' => $lng['emails']['account_delete'],
'label' => lng('emails.account_delete'),
'classes' => 'btn btn-sm btn-danger'
]
]
),
'account_no' => array(
'visible' => (int) $result['popaccountid'] == 0,
'label' => $lng['emails']['account'],
],
'account_no' => [
'visible' => (int)$result['popaccountid'] == 0,
'label' => lng('emails.account'),
'type' => 'label',
'value' => $lng['panel']['no'],
'value' => lng('panel.no'),
'next_to' => [
'add_link' => [
'type' => 'link',
'href' => $filename . '?page=accounts&amp;action=add&amp;id=' . $result['id'],
'label' => $lng['emails']['account_add'],
'label' => lng('emails.account_add'),
'classes' => 'btn btn-sm btn-primary'
]
]
),
'mail_quota' => array(
'visible' => ((int) $result['popaccountid'] != 0 && \Froxlor\Settings::Get('system.mail_quota_enabled')),
'label' => $lng['customer']['email_quota'],
],
'mail_quota' => [
'visible' => ((int)$result['popaccountid'] != 0 && Settings::Get('system.mail_quota_enabled')),
'label' => lng('customer.email_quota'),
'type' => 'label',
'value' => $result['quota'] . ' MiB',
'next_to' => [
'add_link' => [
'visible' => ((int)$result['popaccountid'] != 0 && \Froxlor\Settings::Get('system.mail_quota_enabled')),
'visible' => ((int)$result['popaccountid'] != 0 && Settings::Get('system.mail_quota_enabled')),
'type' => 'link',
'href' => $filename . '?page=accounts&amp;action=changequota&amp;id=' . $result['id'],
'label' => $lng['emails']['quota_edit'],
'label' => lng('emails.quota_edit'),
'classes' => 'btn btn-sm btn-secondary'
]
]
),
],
'mail_catchall' => array(
'label' => $lng['emails']['catchall'],
'label' => lng('emails.catchall'),
'type' => 'label',
'value' => ((int)$result['iscatchall'] == 0 ? $lng['panel']['no'] : $lng['panel']['yes']),
'value' => ((int)$result['iscatchall'] == 0 ? lng('panel.no'] : lng('panel')['yes')),
'next_to' => [
'add_link' => [
'type' => 'link',
'href' => $filename . '?page=' . $page . '&amp;action=togglecatchall&amp;id=' . $result['id'],
'label' => '<i class="fa-solid fa-arrow-right-arrow-left"></i> ' . $lng['panel']['toggle'],
'classes' => 'btn btn-sm btn-secondary'
]
]
'add_link' => [
'type' => 'link',
'href' => $filename . '?page=' . $page . '&amp;action=togglecatchall&amp;id=' . $result['id'],
'label' => '<i class="fa-solid fa-arrow-right-arrow-left"></i> ' . lng('panel.toggle'),
'classes' => 'btn btn-sm btn-secondary'
]
]
),
'mail_fwds' => array(
'label' => $lng['emails']['forwarders'] . ' (' . $forwarders_count . ')',
'type' => 'itemlist',
'values' => $forwarders,
'next_to' => [
'add_link' => [
'type' => 'link',
'href' => $filename . '?page=forwarders&amp;action=add&amp;id=' . $result['id'],
'label' => $lng['emails']['forwarder_add'],
'classes' => 'btn btn-sm btn-primary'
]
]
)
'mail_fwds' => [
'label' => lng('emails.forwarders') . ' (' . $forwarders_count . ')',
'type' => 'itemlist',
'values' => $forwarders,
'next_to' => [
'add_link' => [
'type' => 'link',
'href' => $filename . '?page=forwarders&amp;action=add&amp;id=' . $result['id'],
'label' => lng('emails.forwarder_add'),
'classes' => 'btn btn-sm btn-primary'
]
]
]
)
)
)
)
);
)

View File

@@ -6,57 +6,60 @@
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* COPYING file online at https://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 https://files.froxlor.org/misc/COPYING.txt
* @package Formfields
*
*/
return array(
'backup' => array(
'title' => $lng['extras']['backup'],
use Froxlor\Settings;
return [
'backup' => [
'title' => lng('extras.backup'),
'image' => 'fa-solid fa-server',
'sections' => array(
'section_a' => array(
'title' => $lng['extras']['backup'],
'sections' => [
'section_a' => [
'title' => lng('extras.backup'),
'image' => 'icons/backup_big.png',
'fields' => array(
'path' => array(
'label' => $lng['panel']['backuppath']['title'],
'desc' => $lng['panel']['backuppath']['description'] . '<br>' . (\Froxlor\Settings::Get('panel.pathedit') != 'Dropdown' ? $lng['panel']['pathDescription'] : null),
'fields' => [
'path' => [
'label' => lng('panel.backuppath.title'),
'desc' => lng('panel.backuppath.description') . '<br>' . (Settings::Get('panel.pathedit') != 'Dropdown' ? lng('panel.pathDescription') : null),
'type' => $pathSelect['type'],
'select_var' => $pathSelect['select_var'] ?? '',
'value' => $pathSelect['value'],
'note' => $pathSelect['note'] ?? '',
),
'path_protection_info' => array(
'label' => $lng['extras']['path_protection_label'],
],
'path_protection_info' => [
'label' => lng('extras.path_protection_label'),
'type' => 'infotext',
'value' => $lng['extras']['path_protection_info'],
'value' => lng('extras.path_protection_info'),
'classes' => 'fw-bold text-danger'
),
'backup_web' => array(
'label' => $lng['extras']['backup_web'],
],
'backup_web' => [
'label' => lng('extras.backup_web'),
'type' => 'checkbox',
'value' => '1',
'checked' => true
),
'backup_mail' => array(
'label' => $lng['extras']['backup_mail'],
],
'backup_mail' => [
'label' => lng('extras.backup_mail'),
'type' => 'checkbox',
'value' => '1',
'checked' => true
),
'backup_dbs' => array(
'label' => $lng['extras']['backup_dbs'],
],
'backup_dbs' => [
'label' => lng('extras.backup_dbs'),
'type' => 'checkbox',
'value' => '1',
'checked' => true
)
)
)
)
)
);
]
]
]
]
]
];

View File

@@ -4,66 +4,77 @@
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
return array(
'htaccess_add' => array(
'title' => $lng['extras']['pathoptions_add'],
use Froxlor\Settings;
return [
'htaccess_add' => [
'title' => lng('extras.pathoptions_add'),
'image' => 'fa-solid fa-folder',
'self_overview' => ['section' => 'extras', 'page' => 'htaccess'],
'sections' => array(
'section_a' => array(
'title' => $lng['extras']['pathoptions_add'],
'sections' => [
'section_a' => [
'title' => lng('extras.pathoptions_add'),
'image' => 'icons/htpasswd_add.png',
'fields' => array(
'path' => array(
'label' => $lng['panel']['path'],
'desc' => (\Froxlor\Settings::Get('panel.pathedit') != 'Dropdown' ? $lng['panel']['pathDescription'] : null),
'fields' => [
'path' => [
'label' => lng('panel.path'),
'desc' => (Settings::Get('panel.pathedit') != 'Dropdown' ? lng('panel.pathDescription') : null),
'type' => $pathSelect['type'],
'select_var' => $pathSelect['select_var'] ?? '',
'value' => $pathSelect['value'],
'note' => $pathSelect['note'] ?? '',
),
'options_indexes' => array(
'label' => $lng['extras']['directory_browsing'],
],
'options_indexes' => [
'label' => lng('extras.directory_browsing'),
'type' => 'checkbox',
'value' => '1',
'checked' => false
),
'error404path' => array(
'label' => $lng['extras']['errordocument404path'],
'desc' => $lng['panel']['descriptionerrordocument'],
],
'error404path' => [
'label' => lng('extras.errordocument404path'),
'desc' => lng('panel.descriptionerrordocument'),
'type' => 'text'
),
'error403path' => array(
'visible' => (\Froxlor\Settings::Get('system.webserver') == 'apache2'),
'label' => $lng['extras']['errordocument403path'],
'desc' => $lng['panel']['descriptionerrordocument'],
],
'error403path' => [
'visible' => (Settings::Get('system.webserver') == 'apache2'),
'label' => lng('extras.errordocument403path'),
'desc' => lng('panel.descriptionerrordocument'),
'type' => 'text'
),
'error500path' => array(
'visible' => (\Froxlor\Settings::Get('system.webserver') == 'apache2'),
'label' => $lng['extras']['errordocument500path'],
'desc' => $lng['panel']['descriptionerrordocument'],
],
'error500path' => [
'visible' => (Settings::Get('system.webserver') == 'apache2'),
'label' => lng('extras.errordocument500path'),
'desc' => lng('panel.descriptionerrordocument'),
'type' => 'text'
),
'options_cgi' => array(
],
'options_cgi' => [
'visible' => ($cperlenabled == 1),
'label' => $lng['extras']['execute_perl'],
'label' => lng('extras.execute_perl'),
'type' => 'checkbox',
'value' => '1',
'checked' => false
)
)
)
)
)
);
]
]
]
]
]
];

View File

@@ -4,66 +4,77 @@
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
return array(
'htaccess_edit' => array(
'title' => $lng['extras']['pathoptions_edit'],
use Froxlor\Settings;
return [
'htaccess_edit' => [
'title' => lng('extras.pathoptions_edit'),
'image' => 'fa-solid fa-folder',
'self_overview' => ['section' => 'extras', 'page' => 'htaccess'],
'sections' => array(
'section_a' => array(
'title' => $lng['extras']['pathoptions_edit'],
'sections' => [
'section_a' => [
'title' => lng('extras.pathoptions_edit'),
'image' => 'icons/htpasswd_edit.png',
'fields' => array(
'path' => array(
'label' => $lng['panel']['path'],
'fields' => [
'path' => [
'label' => lng('panel.path'),
'type' => 'label',
'value' => $result['path']
),
'options_indexes' => array(
'label' => $lng['extras']['directory_browsing'],
],
'options_indexes' => [
'label' => lng('extras.directory_browsing'),
'type' => 'checkbox',
'value' => '1',
'checked' => $result['options_indexes']
),
'error404path' => array(
'label' => $lng['extras']['errordocument404path'],
'desc' => $lng['panel']['descriptionerrordocument'],
],
'error404path' => [
'label' => lng('extras.errordocument404path'),
'desc' => lng('panel.descriptionerrordocument'),
'type' => 'text',
'value' => $result['error404path']
),
'error403path' => array(
'visible' => (\Froxlor\Settings::Get('system.webserver') == 'apache2'),
'label' => $lng['extras']['errordocument403path'],
'desc' => $lng['panel']['descriptionerrordocument'],
],
'error403path' => [
'visible' => (Settings::Get('system.webserver') == 'apache2'),
'label' => lng('extras.errordocument403path'),
'desc' => lng('panel.descriptionerrordocument'),
'type' => 'text',
'value' => $result['error403path']
),
'error500path' => array(
'visible' => (\Froxlor\Settings::Get('system.webserver') == 'apache2'),
'label' => $lng['extras']['errordocument500path'],
'desc' => $lng['panel']['descriptionerrordocument'],
],
'error500path' => [
'visible' => (Settings::Get('system.webserver') == 'apache2'),
'label' => lng('extras.errordocument500path'),
'desc' => lng('panel.descriptionerrordocument'),
'type' => 'text',
'value' => $result['error500path']
),
'options_cgi' => array(
],
'options_cgi' => [
'visible' => ($cperlenabled == 1),
'label' => $lng['extras']['execute_perl'],
'label' => lng('extras.execute_perl'),
'type' => 'checkbox',
'value' => '1',
'checked' => $result['options_cgi']
)
)
)
)
)
);
]
]
]
]
]
];

View File

@@ -4,55 +4,67 @@
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
return array(
'htpasswd_add' => array(
'title' => $lng['extras']['directoryprotection_add'],
use Froxlor\Settings;
use Froxlor\System\Crypt;
return [
'htpasswd_add' => [
'title' => lng('extras.directoryprotection_add'),
'image' => 'fa-solid fa-lock',
'self_overview' => ['section' => 'extras', 'page' => 'htpasswds'],
'sections' => array(
'section_a' => array(
'title' => $lng['extras']['directoryprotection_add'],
'sections' => [
'section_a' => [
'title' => lng('extras.directoryprotection_add'),
'image' => 'icons/htpasswd_add.png',
'fields' => array(
'path' => array(
'label' => $lng['panel']['path'],
'desc' => (\Froxlor\Settings::Get('panel.pathedit') != 'Dropdown' ? $lng['panel']['pathDescription'] : null),
'fields' => [
'path' => [
'label' => lng('panel.path'),
'desc' => (Settings::Get('panel.pathedit') != 'Dropdown' ? lng('panel.pathDescription') : null),
'type' => $pathSelect['type'],
'select_var' => $pathSelect['select_var'] ?? '',
'value' => $pathSelect['value'],
'note' => $pathSelect['note'] ?? '',
),
'username' => array(
'label' => $lng['login']['username'],
],
'username' => [
'label' => lng('login.username'),
'type' => 'text'
),
'directory_password' => array(
'label' => $lng['login']['password'],
],
'directory_password' => [
'label' => lng('login.password'),
'type' => 'password',
'autocomplete' => 'off'
),
'directory_password_suggestion' => array(
'label' => $lng['customer']['generated_pwd'],
],
'directory_password_suggestion' => [
'label' => lng('customer.generated_pwd'),
'type' => 'text',
'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''),
'value' => \Froxlor\System\Crypt::generatePassword()
),
'directory_authname' => array(
'label' => $lng['extras']['htpasswdauthname'],
'visible' => (Settings::Get('panel.password_regex') == ''),
'value' => Crypt::generatePassword()
],
'directory_authname' => [
'label' => lng('extras.htpasswdauthname'),
'type' => 'text'
)
)
)
)
)
);
]
]
]
]
]
];

View File

@@ -4,54 +4,66 @@
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
return array(
'htpasswd_edit' => array(
'title' => $lng['extras']['directoryprotection_edit'],
use Froxlor\Settings;
use Froxlor\System\Crypt;
return [
'htpasswd_edit' => [
'title' => lng('extras.directoryprotection_edit'),
'image' => 'fa-solid fa-lock',
'self_overview' => ['section' => 'extras', 'page' => 'htpasswds'],
'sections' => array(
'section_a' => array(
'title' => $lng['extras']['directoryprotection_edit'],
'sections' => [
'section_a' => [
'title' => lng('extras.directoryprotection_edit'),
'image' => 'icons/htpasswd_edit.png',
'fields' => array(
'path' => array(
'label' => $lng['panel']['path'],
'fields' => [
'path' => [
'label' => lng('panel.path'),
'type' => 'label',
'value' => $result['path']
),
'username' => array(
'label' => $lng['login']['username'],
],
'username' => [
'label' => lng('login.username'),
'type' => 'label',
'value' => $result['username']
),
'directory_password' => array(
'label' => $lng['login']['password'],
],
'directory_password' => [
'label' => lng('login.password'),
'type' => 'password',
'autocomplete' => 'off'
),
'directory_password_suggestion' => array(
'label' => $lng['customer']['generated_pwd'],
],
'directory_password_suggestion' => [
'label' => lng('customer.generated_pwd'),
'type' => 'text',
'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''),
'value' => \Froxlor\System\Crypt::generatePassword()
),
'directory_authname' => array(
'label' => $lng['extras']['htpasswdauthname'],
'visible' => (Settings::Get('panel.password_regex') == ''),
'value' => Crypt::generatePassword()
],
'directory_authname' => [
'label' => lng('extras.htpasswdauthname'),
'type' => 'text',
'value' => $result['authname']
)
)
)
)
)
);
]
]
]
]
]
];

View File

@@ -6,75 +6,79 @@
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* COPYING file online at https://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 https://files.froxlor.org/misc/COPYING.txt
* @package Formfields
*/
return array(
'ftp_add' => array(
'title' => $lng['ftp']['account_add'],
use Froxlor\Settings;
use Froxlor\System\Crypt;
return [
'ftp_add' => [
'title' => lng('ftp.account_add'),
'image' => 'icons/user_add.png',
'self_overview' => ['section' => 'ftp', 'page' => 'accounts'],
'sections' => array(
'section_a' => array(
'title' => $lng['ftp']['account_add'],
'sections' => [
'section_a' => [
'title' => lng('ftp.account_add'),
'image' => 'icons/user_add.png',
'fields' => array(
'ftp_username' => array(
'visible' => \Froxlor\Settings::Get('customer.ftpatdomain') == '1',
'label' => $lng['login']['username'],
'fields' => [
'ftp_username' => [
'visible' => Settings::Get('customer.ftpatdomain') == '1',
'label' => lng('login.username'),
'type' => 'text',
'next_to' => (\Froxlor\Settings::Get('customer.ftpatdomain') == '1' && count($domainlist) > 0 ? [
'ftp_domain' => array(
'next_to' => (Settings::Get('customer.ftpatdomain') == '1' && count($domainlist) > 0 ? [
'ftp_domain' => [
'next_to_prefix' => '@',
'label' => $lng['domains']['domainname'],
'label' => lng('domains.domainname'),
'type' => 'select',
'select_var' => $domainlist
),
],
]
: [])
),
'ftp_description' => array(
'label' => $lng['panel']['ftpdesc'],
: [])
],
'ftp_description' => [
'label' => lng('panel.ftpdesc'),
'type' => 'text'
),
'path' => array(
'label' => $lng['panel']['path'],
'desc' => (\Froxlor\Settings::Get('panel.pathedit') != 'Dropdown' ? $lng['panel']['pathDescription'] : null),
],
'path' => [
'label' => lng('panel.path'),
'desc' => (Settings::Get('panel.pathedit') != 'Dropdown' ? lng('panel.pathDescription') : null),
'type' => $pathSelect['type'],
'select_var' => $pathSelect['select_var'] ?? '',
'value' => $pathSelect['value'],
'note' => $pathSelect['note'] ?? '',
),
'ftp_password' => array(
'label' => $lng['login']['password'],
],
'ftp_password' => [
'label' => lng('login.password'),
'type' => 'password',
'autocomplete' => 'off'
),
'ftp_password_suggestion' => array(
'label' => $lng['customer']['generated_pwd'],
],
'ftp_password_suggestion' => [
'label' => lng('customer.generated_pwd'),
'type' => 'text',
'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''),
'value' => \Froxlor\System\Crypt::generatePassword()
),
'sendinfomail' => array(
'label' => $lng['customer']['sendinfomail'],
'visible' => (Settings::Get('panel.password_regex') == ''),
'value' => Crypt::generatePassword()
],
'sendinfomail' => [
'label' => lng('customer.sendinfomail'),
'type' => 'checkbox',
'value' => '1',
'checked' => false
),
'shell' => array(
'visible' => \Froxlor\Settings::Get('system.allow_customer_shell') == '1',
'label' => $lng['panel']['shell'],
],
'shell' => [
'visible' => Settings::Get('system.allow_customer_shell') == '1',
'label' => lng('panel.shell'),
'type' => 'select',
'select_var' => $shells_avail,
'selected' => '/bin/false'
)
)
)
)
)
);
]
]
]
]
]
];

View File

@@ -6,62 +6,66 @@
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* COPYING file online at https://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 https://files.froxlor.org/misc/COPYING.txt
* @package Formfields
*/
return array(
'ftp_edit' => array(
'title' => $lng['ftp']['account_edit'],
use Froxlor\Settings;
use Froxlor\System\Crypt;
return [
'ftp_edit' => [
'title' => lng('ftp.account_edit'),
'image' => 'icons/user_edit.png',
'self_overview' => ['section' => 'ftp', 'page' => 'accounts'],
'sections' => array(
'section_a' => array(
'title' => $lng['ftp']['account_edit'],
'sections' => [
'section_a' => [
'title' => lng('ftp.account_edit'),
'image' => 'icons/user_edit.png',
'fields' => array(
'username' => array(
'label' => $lng['login']['username'],
'fields' => [
'username' => [
'label' => lng('login.username'),
'type' => 'label',
'value' => $result['username']
),
'ftp_description' => array(
'label' => $lng['panel']['ftpdesc'],
],
'ftp_description' => [
'label' => lng('panel.ftpdesc'),
'type' => 'text',
'value' => $result['description']
),
'path' => array(
'label' => $lng['panel']['path'],
'desc' => (\Froxlor\Settings::Get('panel.pathedit') != 'Dropdown' ? $lng['panel']['pathDescription'] : null),
],
'path' => [
'label' => lng('panel.path'),
'desc' => (Settings::Get('panel.pathedit') != 'Dropdown' ? lng('panel.pathDescription') : null),
'type' => $pathSelect['type'],
'select_var' => $pathSelect['select_var'] ?? '',
'value' => $pathSelect['value'],
'note' => $pathSelect['note'] ?? '',
),
'ftp_password' => array(
'label' => $lng['login']['password'],
'desc' => $lng['ftp']['editpassdescription'],
],
'ftp_password' => [
'label' => lng('login.password'),
'desc' => lng('ftp.editpassdescription'),
'type' => 'password',
'autocomplete' => 'off'
),
'ftp_password_suggestion' => array(
'label' => $lng['customer']['generated_pwd'],
],
'ftp_password_suggestion' => [
'label' => lng('customer.generated_pwd'),
'type' => 'text',
'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''),
'value' => \Froxlor\System\Crypt::generatePassword()
),
'shell' => array(
'visible' => \Froxlor\Settings::Get('system.allow_customer_shell') == '1',
'label' => $lng['panel']['shell'],
'visible' => (Settings::Get('panel.password_regex') == ''),
'value' => Crypt::generatePassword()
],
'shell' => [
'visible' => Settings::Get('system.allow_customer_shell') == '1',
'label' => lng('panel.shell'),
'type' => 'select',
'select_var' => $shells_avail,
'selected' => $result['shell'] ?? '/bin/false'
)
)
)
)
)
);
]
]
]
]
]
];

View File

@@ -1,6 +1,7 @@
<?php
use Froxlor\Settings;
use Froxlor\System\Crypt;
/**
* This file is part of the Froxlor project.
@@ -8,57 +9,58 @@ use Froxlor\Settings;
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* COPYING file online at https://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 https://files.froxlor.org/misc/COPYING.txt
* @package Formfields
*/
return array(
'mysql_add' => array(
'title' => $lng['mysql']['database_create'],
return [
'mysql_add' => [
'title' => lng('mysql.database_create'),
'image' => 'icons/mysql_add.png',
'self_overview' => ['section' => 'mysql', 'page' => 'mysqls'],
'sections' => array(
'section_a' => array(
'title' => $lng['mysql']['database_create'],
'sections' => [
'section_a' => [
'title' => lng('mysql.database_create'),
'image' => 'icons/mysql_add.png',
'fields' => array(
'custom_suffix' => array(
'fields' => [
'custom_suffix' => [
'visible' => strtoupper(Settings::Get('customer.mysqlprefix')) == 'DBNAME',
'label' => $lng['mysql']['databasename'],
'label' => lng('mysql.databasename'),
'type' => 'text'
),
'description' => array(
'label' => $lng['mysql']['databasedescription'],
],
'description' => [
'label' => lng('mysql.databasedescription'),
'type' => 'text'
),
'mysql_server' => array(
],
'mysql_server' => [
'visible' => count($mysql_servers) > 1,
'label' => $lng['mysql']['mysql_server'],
'label' => lng('mysql.mysql_server'),
'type' => 'select',
'select_var' => $mysql_servers
),
'mysql_password' => array(
'label' => $lng['login']['password'],
],
'mysql_password' => [
'label' => lng('login.password'),
'type' => 'password',
'autocomplete' => 'off'
),
'mysql_password_suggestion' => array(
'label' => $lng['customer']['generated_pwd'],
],
'mysql_password_suggestion' => [
'label' => lng('customer.generated_pwd'),
'type' => 'text',
'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''),
'value' => \Froxlor\System\Crypt::generatePassword()
),
'sendinfomail' => array(
'label' => $lng['customer']['sendinfomail'],
'visible' => (Settings::Get('panel.password_regex') == ''),
'value' => Crypt::generatePassword()
],
'sendinfomail' => [
'label' => lng('customer.sendinfomail'),
'type' => 'checkbox',
'value' => '1',
'checked' => false
)
)
)
)
)
);
]
]
]
]
]
];

View File

@@ -6,52 +6,56 @@
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* COPYING file online at https://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 https://files.froxlor.org/misc/COPYING.txt
* @package Formfields
*/
return array(
'mysql_edit' => array(
'title' => $lng['mysql']['database_edit'],
use Froxlor\Settings;
use Froxlor\System\Crypt;
return [
'mysql_edit' => [
'title' => lng('mysql.database_edit'),
'image' => 'icons/mysql_edit.png',
'self_overview' => ['section' => 'mysql', 'page' => 'mysqls'],
'sections' => array(
'section_a' => array(
'title' => $lng['mysql']['database_edit'],
'sections' => [
'section_a' => [
'title' => lng('mysql.database_edit'),
'image' => 'icons/mysql_edit.png',
'fields' => array(
'databasename' => array(
'label' => $lng['mysql']['databasename'],
'fields' => [
'databasename' => [
'label' => lng('mysql.databasename'),
'type' => 'label',
'value' => $result['databasename']
),
'description' => array(
'label' => $lng['mysql']['databasedescription'],
],
'description' => [
'label' => lng('mysql.databasedescription'),
'type' => 'text',
'value' => $result['description']
),
'mysql_server' => array(
],
'mysql_server' => [
'visible' => $count_mysql_servers > 1,
'label' => $lng['mysql']['mysql_server'],
'label' => lng('mysql.mysql_server'),
'type' => 'label',
'value' => $sql_root['caption']
),
'mysql_password' => array(
'label' => $lng['changepassword']['new_password_ifnotempty'],
],
'mysql_password' => [
'label' => lng('changepassword.new_password_ifnotempty'),
'type' => 'password',
'autocomplete' => 'off'
),
'mysql_password_suggestion' => array(
'label' => $lng['customer']['generated_pwd'],
],
'mysql_password_suggestion' => [
'label' => lng('customer.generated_pwd'),
'type' => 'text',
'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''),
'value' => \Froxlor\System\Crypt::generatePassword()
)
)
)
)
)
);
'visible' => (Settings::Get('panel.password_regex') == ''),
'value' => Crypt::generatePassword()
]
]
]
]
]
];

View File

@@ -1,29 +1,35 @@
<?php
use Froxlor\UI\Panel\UI;
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
return [
'apikey' => [
'title' => UI::getLng('menue.main.apikeys'),
'title' => lng('menue.main.apikeys'),
'sections' => [
'section_a' => [
'fields' => [
'loginname' => [
'label' => UI::getLng('login.username'),
'label' => lng('login.username'),
'type' => 'label',
'value' => $result['loginname'] ?? $result['adminname']
],
@@ -40,12 +46,18 @@ return [
'value' => $result['secret']
],
'allowed_from' => [
'label' => ['title' => UI::getLng('apikeys.allowed_from'), 'description' => UI::getLng('apikeys.allowed_from_help')],
'label' => [
'title' => lng('apikeys.allowed_from'),
'description' => lng('apikeys.allowed_from_help')
],
'type' => 'text',
'value' => $result['allowed_from'],
],
'valid_until' => [
'label' => ['title' => UI::getLng('apikeys.valid_until'), 'description' => UI::getLng('apikeys.valid_until_help')],
'label' => [
'title' => lng('apikeys.valid_until'),
'description' => lng('apikeys.valid_until_help')
],
/** @TODO datetime-picker */
'type' => 'text',
'value' => $result['valid_until'] < 0 ? "" : $result['valid_until']

View File

@@ -4,30 +4,39 @@
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
return array(
'dns_add' => array(
return [
'dns_add' => [
'title' => 'DNS Editor',
'image' => 'fa-solid fa-globe',
'sections' => array(
'section_a' => array(
'fields' => array(
'dns_record' => array(
'sections' => [
'section_a' => [
'fields' => [
'dns_record' => [
'label' => 'Record',
'type' => 'text',
'value' => $record,
'mandatory' => true
),
'dns_type' => array(
],
'dns_type' => [
'label' => 'Type',
'type' => 'select',
'select_var' => [
@@ -45,25 +54,25 @@ return array(
'TXT' => 'TXT'
],
'selected' => $type
),
'dns_mxp' => array(
],
'dns_mxp' => [
'label' => 'Priority',
'type' => 'number',
'value' => $prio
),
'dns_content' => array(
],
'dns_content' => [
'label' => 'Content',
'type' => 'text',
'value' => $content
),
'dns_ttl' => array(
],
'dns_ttl' => [
'label' => 'TTL',
'type' => 'number',
'min' => 30,
'value' => $ttl
)
)
)
)
)
);
]
]
]
]
]
];

View File

@@ -4,69 +4,78 @@
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
return array(
'domain_ssleditor' => array(
'title' => $lng['panel']['ssleditor'],
return [
'domain_ssleditor' => [
'title' => lng('panel.ssleditor'),
'image' => 'fa-solid fa-lock',
'sections' => array(
'section_a' => array(
'sections' => [
'section_a' => [
'title' => 'SSL certificates',
'image' => 'icons/ssl.png',
'fields' => array(
'domainname' => array(
'label' => $lng['domains']['domainname'],
'fields' => [
'domainname' => [
'label' => lng('domains.domainname'),
'type' => 'label',
'value' => $result_domain['domain']
),
'ssl_cert_file' => array(
'label' => $lng['admin']['ipsandports']['ssl_cert_file_content'],
'desc' => $lng['admin']['ipsandports']['ssl_paste_description'],
],
'ssl_cert_file' => [
'label' => lng('admin.ipsandports.ssl_cert_file_content'),
'desc' => lng('admin.ipsandports.ssl_paste_description'),
'type' => 'textarea',
'cols' => 100,
'rows' => 15,
'value' => $result['ssl_cert_file']
),
'ssl_key_file' => array(
'label' => $lng['admin']['ipsandports']['ssl_key_file_content'],
'desc' => $lng['admin']['ipsandports']['ssl_paste_description'],
],
'ssl_key_file' => [
'label' => lng('admin.ipsandports.ssl_key_file_content'),
'desc' => lng('admin.ipsandports.ssl_paste_description'),
'type' => 'textarea',
'cols' => 100,
'rows' => 15,
'value' => $result['ssl_key_file']
),
'ssl_cert_chainfile' => array(
'label' => $lng['admin']['ipsandports']['ssl_cert_chainfile_content'],
'desc' => $lng['admin']['ipsandports']['ssl_paste_description'] . $lng['admin']['ipsandports']['ssl_cert_chainfile_content_desc'],
],
'ssl_cert_chainfile' => [
'label' => lng('admin.ipsandports.ssl_cert_chainfile_content'),
'desc' => lng('admin.ipsandports.ssl_paste_description') . lng('admin.ipsandports.ssl_cert_chainfile_content_desc'),
'type' => 'textarea',
'cols' => 100,
'rows' => 15,
'value' => $result['ssl_cert_chainfile']
),
'ssl_ca_file' => array(
'label' => $lng['admin']['ipsandports']['ssl_ca_file_content'],
'desc' => $lng['admin']['ipsandports']['ssl_paste_description'] . $lng['admin']['ipsandports']['ssl_ca_file_content_desc'],
],
'ssl_ca_file' => [
'label' => lng('admin.ipsandports.ssl_ca_file_content'),
'desc' => lng('admin.ipsandports.ssl_paste_description') . lng('admin.ipsandports.ssl_ca_file_content_desc'),
'type' => 'textarea',
'cols' => 100,
'rows' => 15,
'value' => $result['ssl_ca_file']
),
'do_insert' => array(
],
'do_insert' => [
'type' => 'hidden',
'value' => '1',
'visible' => empty($result['ssl_cert_file'])
)
)
)
)
)
);
]
]
]
]
]
];

View File

@@ -4,20 +4,26 @@
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
use Froxlor\Settings;
return array(
return [
'install' => [
'title' => lng('admin.admin_add'),
'image' => 'fa-solid fa-user-plus',
@@ -175,4 +181,4 @@ return array(
]
]
]
);
];