more function moving

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2018-12-20 08:33:32 +01:00
parent 8c896d60d6
commit bed069f269
41 changed files with 336 additions and 351 deletions

View File

@@ -45,7 +45,7 @@ return array(
'type' => 'option', 'type' => 'option',
'default' => 0, 'default' => 0,
'option_mode' => 'one', 'option_mode' => 'one',
'option_options_method' => array('\\Froxlor\\System', 'getAvailablePasswordHashes'), 'option_options_method' => array('\\Froxlor\\System\\Crypt', 'getAvailablePasswordHashes'),
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField',
), ),
'system_allow_error_report_admin' => array( 'system_allow_error_report_admin' => array(

View File

@@ -119,8 +119,8 @@ if ($page == 'overview') {
$userinfo['custom_notes'] = ($userinfo['custom_notes'] != '') ? nl2br($userinfo['custom_notes']) : ''; $userinfo['custom_notes'] = ($userinfo['custom_notes'] != '') ? nl2br($userinfo['custom_notes']) : '';
$cron_last_runs = getCronjobsLastRun(); $cron_last_runs = \Froxlor\System\Cronjob::getCronjobsLastRun();
$outstanding_tasks = getOutstandingTasks(); $outstanding_tasks = \Froxlor\System\Cronjob::getOutstandingTasks();
$system_hostname = gethostname(); $system_hostname = gethostname();
$meminfo = explode("\n", @file_get_contents("/proc/meminfo")); $meminfo = explode("\n", @file_get_contents("/proc/meminfo"));

View File

@@ -135,7 +135,7 @@ if ($page == 'overview') {
// Update ftp password // Update ftp password
if (isset($_POST['change_main_ftp']) && $_POST['change_main_ftp'] == 'true') { if (isset($_POST['change_main_ftp']) && $_POST['change_main_ftp'] == 'true') {
$cryptPassword = \Froxlor\System::makeCryptPassword($new_password); $cryptPassword = \Froxlor\System\Crypt::makeCryptPassword($new_password);
$stmt = Database::prepare("UPDATE `" . TABLE_FTP_USERS . "` $stmt = Database::prepare("UPDATE `" . TABLE_FTP_USERS . "`
SET `password` = :password SET `password` = :password
WHERE `customerid` = :customerid WHERE `customerid` = :customerid

View File

@@ -624,7 +624,7 @@ if ($action == 'resetpwd') {
WHERE `customerid` = :userid"); WHERE `customerid` = :userid");
} }
Database::pexecute($stmt, array( Database::pexecute($stmt, array(
"newpassword" => \Froxlor\System::makeCryptPassword($new_password), "newpassword" => \Froxlor\System\Crypt::makeCryptPassword($new_password),
"userid" => $result['userid'] "userid" => $result['userid']
)); ));

View File

@@ -260,14 +260,14 @@ class Admins extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEnt
} }
if ($password == '') { if ($password == '') {
$password = \Froxlor\System::generatePassword(); $password = \Froxlor\System\Crypt::generatePassword();
} }
$_theme = Settings::Get('panel.default_theme'); $_theme = Settings::Get('panel.default_theme');
$ins_data = array( $ins_data = array(
'loginname' => $loginname, 'loginname' => $loginname,
'password' => \Froxlor\System::makeCryptPassword($password), 'password' => \Froxlor\System\Crypt::makeCryptPassword($password),
'name' => $name, 'name' => $name,
'email' => $email, 'email' => $email,
'lang' => $def_language, 'lang' => $def_language,
@@ -530,7 +530,7 @@ class Admins extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEnt
if ($password != '') { if ($password != '') {
$password = validatePassword($password, true); $password = validatePassword($password, true);
$password = \Froxlor\System::makeCryptPassword($password); $password = \Froxlor\System\Crypt::makeCryptPassword($password);
} else { } else {
$password = $result['password']; $password = $result['password'];
} }

View File

@@ -378,7 +378,7 @@ class Customers extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resource
} }
if ($password == '') { if ($password == '') {
$password = \Froxlor\System::generatePassword(); $password = \Froxlor\System\Crypt::generatePassword();
} }
$_theme = Settings::Get('panel.default_theme'); $_theme = Settings::Get('panel.default_theme');
@@ -386,7 +386,7 @@ class Customers extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resource
$ins_data = array( $ins_data = array(
'adminid' => $this->getUserDetail('adminid'), 'adminid' => $this->getUserDetail('adminid'),
'loginname' => $loginname, 'loginname' => $loginname,
'passwd' => \Froxlor\System::makeCryptPassword($password), 'passwd' => \Froxlor\System\Crypt::makeCryptPassword($password),
'name' => $name, 'name' => $name,
'firstname' => $firstname, 'firstname' => $firstname,
'gender' => $gender, 'gender' => $gender,
@@ -552,7 +552,7 @@ class Customers extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resource
Database::pexecute($ins_stmt, $ins_data, true, true); Database::pexecute($ins_stmt, $ins_data, true, true);
inserttask('1'); inserttask('1');
$cryptPassword = \Froxlor\System::makeCryptPassword($password); $cryptPassword = \Froxlor\System\Crypt::makeCryptPassword($password);
// add FTP-User // add FTP-User
// @fixme use Ftp-ApiCommand later // @fixme use Ftp-ApiCommand later
$ins_stmt = Database::prepare(" $ins_stmt = Database::prepare("
@@ -941,7 +941,7 @@ class Customers extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resource
if ($password != '') { if ($password != '') {
$password = validatePassword($password, true); $password = validatePassword($password, true);
$password = \Froxlor\System::makeCryptPassword($password); $password = \Froxlor\System\Crypt::makeCryptPassword($password);
} else { } else {
$password = $result['password']; $password = $result['password'];
} }

View File

@@ -122,7 +122,7 @@ class EmailAccounts extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Reso
} }
// encrypt the password // encrypt the password
$cryptPassword = \Froxlor\System::makeCryptPassword($password); $cryptPassword = \Froxlor\System\Crypt::makeCryptPassword($password);
$email_user = substr($email_full, 0, strrpos($email_full, "@")); $email_user = substr($email_full, 0, strrpos($email_full, "@"));
$email_domain = substr($email_full, strrpos($email_full, "@") + 1); $email_domain = substr($email_full, strrpos($email_full, "@") + 1);
@@ -347,7 +347,7 @@ class EmailAccounts extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Reso
standard_error('passwordshouldnotbeusername', '', true); standard_error('passwordshouldnotbeusername', '', true);
} }
$password = validatePassword($password, true); $password = validatePassword($password, true);
$cryptPassword = \Froxlor\System::makeCryptPassword($password); $cryptPassword = \Froxlor\System\Crypt::makeCryptPassword($password);
$upd_query .= (Settings::Get('system.mailpwcleartext') == '1' ? "`password` = :password, " : '') . "`password_enc`= :password_enc"; $upd_query .= (Settings::Get('system.mailpwcleartext') == '1' ? "`password` = :password, " : '') . "`password_enc`= :password_enc";
$upd_params['password_enc'] = $cryptPassword; $upd_params['password_enc'] = $cryptPassword;
if (Settings::Get('system.mailpwcleartext') == '1') { if (Settings::Get('system.mailpwcleartext') == '1') {

View File

@@ -129,7 +129,7 @@ class Ftps extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEntit
standard_error('passwordshouldnotbeusername', '', true); standard_error('passwordshouldnotbeusername', '', true);
} else { } else {
$path = \Froxlor\FileDir::makeCorrectDir($customer['documentroot'] . '/' . $path); $path = \Froxlor\FileDir::makeCorrectDir($customer['documentroot'] . '/' . $path);
$cryptPassword = \Froxlor\System::makeCryptPassword($password); $cryptPassword = \Froxlor\System\Crypt::makeCryptPassword($password);
$stmt = Database::prepare("INSERT INTO `" . TABLE_FTP_USERS . "` $stmt = Database::prepare("INSERT INTO `" . TABLE_FTP_USERS . "`
(`customerid`, `username`, `description`, `password`, `homedir`, `login_enabled`, `uid`, `gid`, `shell`) (`customerid`, `username`, `description`, `password`, `homedir`, `login_enabled`, `uid`, `gid`, `shell`)
@@ -358,7 +358,7 @@ class Ftps extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEntit
if ($password == $result['username']) { if ($password == $result['username']) {
standard_error('passwordshouldnotbeusername', '', true); standard_error('passwordshouldnotbeusername', '', true);
} }
$cryptPassword = \Froxlor\System::makeCryptPassword($password); $cryptPassword = \Froxlor\System\Crypt::makeCryptPassword($password);
$stmt = Database::prepare("UPDATE `" . TABLE_FTP_USERS . "` $stmt = Database::prepare("UPDATE `" . TABLE_FTP_USERS . "`
SET `password` = :password SET `password` = :password

View File

@@ -179,7 +179,7 @@ class Store
* when fielddata[cronmodule] is set, this means enable/disable a cronjob * when fielddata[cronmodule] is set, this means enable/disable a cronjob
*/ */
if (isset($fielddata['cronmodule']) && $fielddata['cronmodule'] != '') { if (isset($fielddata['cronmodule']) && $fielddata['cronmodule'] != '') {
toggleCronStatus($fielddata['cronmodule'], $newfieldvalue); \Froxlor\System\Cronjob::toggleCronStatus($fielddata['cronmodule'], $newfieldvalue);
} }
/* /*

View File

@@ -0,0 +1,194 @@
<?php
namespace Froxlor\System;
use Froxlor\Settings;
use Froxlor\Database\Database;
class Cronjob
{
public static function getCronjobsLastRun()
{
global $lng;
$query = "SELECT `lastrun`, `desc_lng_key` FROM `" . TABLE_PANEL_CRONRUNS . "` WHERE `isactive` = '1' ORDER BY `cronfile` ASC";
$result = Database::query($query);
$cronjobs_last_run = '';
while ($row = $result->fetch(\PDO::FETCH_ASSOC)) {
$lastrun = $lng['cronjobs']['notyetrun'];
if ($row['lastrun'] > 0) {
$lastrun = date('d.m.Y H:i:s', $row['lastrun']);
}
$text = $lng['crondesc'][$row['desc_lng_key']];
$value = $lastrun;
eval("\$cronjobs_last_run .= \"" . getTemplate("index/overview_item") . "\";");
}
return $cronjobs_last_run;
}
public static function toggleCronStatus($module = null, $isactive = 0)
{
if ($isactive != 1) {
$isactive = 0;
}
$upd_stmt = Database::prepare("
UPDATE `" . TABLE_PANEL_CRONRUNS . "` SET `isactive` = :active WHERE `module` = :module");
Database::pexecute($upd_stmt, array(
'active' => $isactive,
'module' => $module
));
}
public static function getOutstandingTasks()
{
global $lng;
$query = "SELECT * FROM `" . TABLE_PANEL_TASKS . "` ORDER BY `type` ASC";
$result = Database::query($query);
$value = '<ul class="cronjobtask">';
$tasks = '';
while ($row = $result->fetch(\PDO::FETCH_ASSOC)) {
if ($row['data'] != '') {
$row['data'] = json_decode($row['data'], true);
}
// rebuilding webserver-configuration
if ($row['type'] == '1') {
$task_desc = $lng['tasks']['rebuild_webserverconfig'];
} // adding new user/
elseif ($row['type'] == '2') {
$loginname = '';
if (is_array($row['data'])) {
$loginname = $row['data']['loginname'];
}
$task_desc = $lng['tasks']['adding_customer'];
$task_desc = str_replace('%loginname%', $loginname, $task_desc);
} // rebuilding bind-configuration
elseif ($row['type'] == '4') {
$task_desc = $lng['tasks']['rebuild_bindconfig'];
} // creating ftp-user directory
elseif ($row['type'] == '5') {
$task_desc = $lng['tasks']['creating_ftpdir'];
} // deleting user-files
elseif ($row['type'] == '6') {
$loginname = '';
if (is_array($row['data'])) {
$loginname = $row['data']['loginname'];
}
$task_desc = $lng['tasks']['deleting_customerfiles'];
$task_desc = str_replace('%loginname%', $loginname, $task_desc);
} // deleting email-account
elseif ($row['type'] == '7') {
$task_desc = $lng['tasks']['remove_emailacc_files'];
} // deleting ftp-account
elseif ($row['type'] == '8') {
$task_desc = $lng['tasks']['remove_ftpacc_files'];
} // Set FS - quota
elseif ($row['type'] == '10') {
$task_desc = $lng['tasks']['diskspace_set_quota'];
} // deleting user-files
elseif ($row['type'] == '20') {
$loginname = '';
if (is_array($row['data'])) {
$loginname = $row['data']['loginname'];
}
$task_desc = $lng['tasks']['backup_customerfiles'];
$task_desc = str_replace('%loginname%', $loginname, $task_desc);
} // re-generating of cron.d-file
elseif ($row['type'] == '99') {
$task_desc = $lng['tasks']['regenerating_crond'];
} // unknown
else {
$task_desc = "ERROR: Unknown task type '" . $row['type'] . "'";
}
if ($task_desc != '') {
$tasks .= '<li>' . $task_desc . '</li>';
}
}
if (trim($tasks) == '') {
$value .= '<li>' . $lng['tasks']['noneoutstanding'] . '</li>';
} else {
$value .= $tasks;
}
$value .= '</ul>';
$text = $lng['tasks']['outstanding_tasks'];
eval("\$outstanding_tasks = \"" . getTemplate("index/overview_item") . "\";");
return $outstanding_tasks;
}
/**
* Cronjob function to end a cronjob in a critical condition
* but not without sending a notification mail to the admin
*
* @param string $message
* @param string $subject
*
* @return void
*/
public static function dieWithMail($message, $subject = "[froxlor] Cronjob error")
{
if (Settings::Get('system.send_cron_errors') == '1') {
$_mail = new \PHPMailer\PHPMailer\PHPMailer(true);
$_mail->CharSet = "UTF-8";
if (Settings::Get('system.mail_use_smtp')) {
$_mail->isSMTP();
$_mail->Host = Settings::Get('system.mail_smtp_host');
$_mail->SMTPAuth = Settings::Get('system.mail_smtp_auth') == '1' ? true : false;
$_mail->Username = Settings::Get('system.mail_smtp_user');
$_mail->Password = Settings::Get('system.mail_smtp_passwd');
if (Settings::Get('system.mail_smtp_usetls')) {
$_mail->SMTPSecure = 'tls';
} else {
$_mail->SMTPAutoTLS = false;
}
$_mail->Port = Settings::Get('system.mail_smtp_port');
}
if (\PHPMailer\PHPMailer\PHPMailer::ValidateAddress(Settings::Get('panel.adminmail')) !== false) {
// set return-to address and custom sender-name, see #76
$_mail->SetFrom(Settings::Get('panel.adminmail'), Settings::Get('panel.adminmail_defname'));
if (Settings::Get('panel.adminmail_return') != '') {
$_mail->AddReplyTo(Settings::Get('panel.adminmail_return'), Settings::Get('panel.adminmail_defname'));
}
}
$_mailerror = false;
$mailerr_msg = "";
try {
$_mail->Subject = $subject;
$_mail->AltBody = $message;
$_mail->MsgHTML(nl2br($message));
$_mail->AddAddress(Settings::Get('panel.adminmail'), Settings::Get('panel.adminmail_defname'));
$_mail->Send();
} catch (\PHPMailer\PHPMailer\Exception $e) {
$mailerr_msg = $e->errorMessage();
$_mailerror = true;
} catch (\Exception $e) {
$mailerr_msg = $e->getMessage();
$_mailerror = true;
}
$_mail->ClearAddresses();
if ($_mailerror) {
echo 'Error sending mail: ' . $mailerr_msg . "\n";
}
}
die($message);
}
}

View File

@@ -3,14 +3,14 @@ namespace Froxlor\System;
use Froxlor\Settings; use Froxlor\Settings;
class System class Crypt
{ {
/** /**
* Generates a random password * Generates a random password
* *
* @param boolean $isSalt * @param boolean $isSalt
* optional, create a hash for a salt used in \Froxlor\System::makeCryptPassword because crypt() does not like some special characters in its salts, default is false * optional, create a hash for a salt used in \Froxlor\System\Crypt::makeCryptPassword because crypt() does not like some special characters in its salts, default is false
*/ */
public static function generatePassword($isSalt = false) public static function generatePassword($isSalt = false)
{ {
@@ -137,68 +137,4 @@ class System
return $available_pwdhashes; return $available_pwdhashes;
} }
/**
* Cronjob function to end a cronjob in a critical condition
* but not without sending a notification mail to the admin
*
* @param string $message
* @param string $subject
*
* @return void
*/
public static function dieWithMail($message, $subject = "[froxlor] Cronjob error")
{
if (Settings::Get('system.send_cron_errors') == '1') {
$_mail = new \PHPMailer\PHPMailer\PHPMailer(true);
$_mail->CharSet = "UTF-8";
if (Settings::Get('system.mail_use_smtp')) {
$_mail->isSMTP();
$_mail->Host = Settings::Get('system.mail_smtp_host');
$_mail->SMTPAuth = Settings::Get('system.mail_smtp_auth') == '1' ? true : false;
$_mail->Username = Settings::Get('system.mail_smtp_user');
$_mail->Password = Settings::Get('system.mail_smtp_passwd');
if (Settings::Get('system.mail_smtp_usetls')) {
$_mail->SMTPSecure = 'tls';
} else {
$_mail->SMTPAutoTLS = false;
}
$_mail->Port = Settings::Get('system.mail_smtp_port');
}
if (\PHPMailer\PHPMailer\PHPMailer::ValidateAddress(Settings::Get('panel.adminmail')) !== false) {
// set return-to address and custom sender-name, see #76
$_mail->SetFrom(Settings::Get('panel.adminmail'), Settings::Get('panel.adminmail_defname'));
if (Settings::Get('panel.adminmail_return') != '') {
$_mail->AddReplyTo(Settings::Get('panel.adminmail_return'), Settings::Get('panel.adminmail_defname'));
}
}
$_mailerror = false;
$mailerr_msg = "";
try {
$_mail->Subject = $subject;
$_mail->AltBody = $message;
$_mail->MsgHTML(nl2br($message));
$_mail->AddAddress(Settings::Get('panel.adminmail'), Settings::Get('panel.adminmail_defname'));
$_mail->Send();
} catch (\PHPMailer\PHPMailer\Exception $e) {
$mailerr_msg = $e->errorMessage();
$_mailerror = true;
} catch (\Exception $e) {
$mailerr_msg = $e->getMessage();
$_mailerror = true;
}
$_mail->ClearAddresses();
if ($_mailerror) {
echo 'Error sending mail: ' . $mailerr_msg . "\n";
}
}
die($message);
}
} }

View File

@@ -39,7 +39,7 @@ return array(
'label' => $lng['customer']['generated_pwd'], 'label' => $lng['customer']['generated_pwd'],
'type' => 'text', 'type' => 'text',
'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''), 'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''),
'value' => \Froxlor\System::generatePassword(), 'value' => \Froxlor\System\Crypt::generatePassword(),
), ),
'def_language' => array( 'def_language' => array(
'label' => $lng['login']['language'], 'label' => $lng['login']['language'],

View File

@@ -48,7 +48,7 @@ return array(
'label' => $lng['customer']['generated_pwd'], 'label' => $lng['customer']['generated_pwd'],
'type' => 'text', 'type' => 'text',
'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''), 'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''),
'value' => \Froxlor\System::generatePassword(), 'value' => \Froxlor\System\Crypt::generatePassword(),
'visible' => ($result['adminid'] == $userinfo['userid'] ? false : true) 'visible' => ($result['adminid'] == $userinfo['userid'] ? false : true)
), ),
'def_language' => array( 'def_language' => array(

View File

@@ -62,7 +62,7 @@ return array(
'label' => $lng['customer']['generated_pwd'], 'label' => $lng['customer']['generated_pwd'],
'type' => 'text', 'type' => 'text',
'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''), 'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''),
'value' => \Froxlor\System::generatePassword() 'value' => \Froxlor\System\Crypt::generatePassword()
), ),
'sendpassword' => array( 'sendpassword' => array(
'label' => $lng['admin']['sendpassword'], 'label' => $lng['admin']['sendpassword'],

View File

@@ -59,7 +59,7 @@ return array(
'label' => $lng['customer']['generated_pwd'], 'label' => $lng['customer']['generated_pwd'],
'type' => 'text', 'type' => 'text',
'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''), 'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''),
'value' => \Froxlor\System::generatePassword(), 'value' => \Froxlor\System\Crypt::generatePassword(),
), ),
'def_language' => array( 'def_language' => array(
'label' => $lng['login']['language'], 'label' => $lng['login']['language'],

View File

@@ -101,7 +101,7 @@ return array(
'desc' => $lng['domains']['ipandport_multi']['description'], 'desc' => $lng['domains']['ipandport_multi']['description'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => $ipsandports, 'values' => $ipsandports,
'value' => explode(',', Settings::Get('system.defaultip')), 'value' => explode(',', \Froxlor\Settings::Get('system.defaultip')),
'is_array' => 1, 'is_array' => 1,
'mandatory' => true 'mandatory' => true
), ),
@@ -133,7 +133,7 @@ return array(
'rows' => 12 'rows' => 12
), ),
'notryfiles' => array( 'notryfiles' => array(
'visible' => (Settings::Get('system.webserver') == 'nginx' && $userinfo['change_serversettings'] == '1'), 'visible' => (\Froxlor\Settings::Get('system.webserver') == 'nginx' && $userinfo['change_serversettings'] == '1'),
'label' => $lng['admin']['notryfiles']['title'], 'label' => $lng['admin']['notryfiles']['title'],
'desc' => $lng['admin']['notryfiles']['description'], 'desc' => $lng['admin']['notryfiles']['description'],
'type' => 'checkbox', 'type' => 'checkbox',
@@ -174,7 +174,7 @@ return array(
'section_bssl' => array( 'section_bssl' => array(
'title' => $lng['admin']['webserversettings_ssl'], 'title' => $lng['admin']['webserversettings_ssl'],
'image' => 'icons/domain_add.png', 'image' => 'icons/domain_add.png',
'visible' => Settings::Get('system.use_ssl') == '1' ? true : false, 'visible' => \Froxlor\Settings::Get('system.use_ssl') == '1' ? true : false,
'fields' => array( 'fields' => array(
'ssl_ipandport' => array( 'ssl_ipandport' => array(
'label' => $lng['domains']['ipandport_ssl_multi']['title'], 'label' => $lng['domains']['ipandport_ssl_multi']['title'],
@@ -198,7 +198,7 @@ return array(
'value' => array() 'value' => array()
), ),
'letsencrypt' => array( 'letsencrypt' => array(
'visible' => (Settings::Get('system.leenabled') == '1' ? ($ssl_ipsandports != '' ? true : false) : false), 'visible' => (\Froxlor\Settings::Get('system.leenabled') == '1' ? ($ssl_ipsandports != '' ? true : false) : false),
'label' => $lng['admin']['letsencrypt']['title'], 'label' => $lng['admin']['letsencrypt']['title'],
'desc' => $lng['admin']['letsencrypt']['description'], 'desc' => $lng['admin']['letsencrypt']['description'],
'type' => 'checkbox', 'type' => 'checkbox',
@@ -211,7 +211,7 @@ return array(
'value' => array() 'value' => array()
), ),
'http2' => array( 'http2' => array(
'visible' => ($ssl_ipsandports != '' ? true : false) && Settings::Get('system.webserver') != 'lighttpd' && Settings::Get('system.http2_support') == '1', 'visible' => ($ssl_ipsandports != '' ? true : false) && \Froxlor\Settings::Get('system.webserver') != 'lighttpd' && \Froxlor\Settings::Get('system.http2_support') == '1',
'label' => $lng['admin']['domain_http2']['title'], 'label' => $lng['admin']['domain_http2']['title'],
'desc' => $lng['admin']['domain_http2']['description'], 'desc' => $lng['admin']['domain_http2']['description'],
'type' => 'checkbox', 'type' => 'checkbox',
@@ -266,10 +266,10 @@ return array(
), ),
'ocsp_stapling' => array( 'ocsp_stapling' => array(
'visible' => ($ssl_ipsandports != '' ? true : false) && 'visible' => ($ssl_ipsandports != '' ? true : false) &&
Settings::Get('system.webserver') != 'lighttpd', \Froxlor\Settings::Get('system.webserver') != 'lighttpd',
'label' => $lng['admin']['domain_ocsp_stapling']['title'], 'label' => $lng['admin']['domain_ocsp_stapling']['title'],
'desc' => $lng['admin']['domain_ocsp_stapling']['description'] . 'desc' => $lng['admin']['domain_ocsp_stapling']['description'] .
(Settings::Get('system.webserver') == 'nginx' ? (\Froxlor\Settings::Get('system.webserver') == 'nginx' ?
$lng['admin']['domain_ocsp_stapling']['nginx_version_warning'] : $lng['admin']['domain_ocsp_stapling']['nginx_version_warning'] :
""), ""),
'type' => 'checkbox', 'type' => 'checkbox',
@@ -315,18 +315,18 @@ return array(
) )
), ),
'phpsettingid' => array( 'phpsettingid' => array(
'visible' => (((int) Settings::Get('system.mod_fcgid') == 1 || (int) Settings::Get('phpfpm.enabled') == 1) ? true : false), 'visible' => (((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 || (int) \Froxlor\Settings::Get('phpfpm.enabled') == 1) ? true : false),
'label' => $lng['admin']['phpsettings']['title'], 'label' => $lng['admin']['phpsettings']['title'],
'type' => 'select', 'type' => 'select',
'select_var' => $phpconfigs 'select_var' => $phpconfigs
), ),
'mod_fcgid_starter' => array( 'mod_fcgid_starter' => array(
'visible' => ((int) Settings::Get('system.mod_fcgid') == 1 ? true : false), 'visible' => ((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false),
'label' => $lng['admin']['mod_fcgid_starter']['title'], 'label' => $lng['admin']['mod_fcgid_starter']['title'],
'type' => 'text' 'type' => 'text'
), ),
'mod_fcgid_maxrequests' => array( 'mod_fcgid_maxrequests' => array(
'visible' => ((int) Settings::Get('system.mod_fcgid') == 1 ? true : false), 'visible' => ((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false),
'label' => $lng['admin']['mod_fcgid_maxrequests']['title'], 'label' => $lng['admin']['mod_fcgid_maxrequests']['title'],
'type' => 'text' 'type' => 'text'
) )
@@ -335,7 +335,7 @@ return array(
'section_d' => array( 'section_d' => array(
'title' => $lng['admin']['nameserversettings'], 'title' => $lng['admin']['nameserversettings'],
'image' => 'icons/domain_add.png', 'image' => 'icons/domain_add.png',
'visible' => (Settings::Get('system.bind_enable') == '1' && $userinfo['change_serversettings'] == '1' ? true : false), 'visible' => (\Froxlor\Settings::Get('system.bind_enable') == '1' && $userinfo['change_serversettings'] == '1' ? true : false),
'fields' => array( 'fields' => array(
'isbinddomain' => array( 'isbinddomain' => array(
'label' => 'Nameserver', 'label' => 'Nameserver',
@@ -391,7 +391,7 @@ return array(
'select_var' => $subcanemaildomain 'select_var' => $subcanemaildomain
), ),
'dkim' => array( 'dkim' => array(
'visible' => (Settings::Get('dkim.use_dkim') == '1' ? true : false), 'visible' => (\Froxlor\Settings::Get('dkim.use_dkim') == '1' ? true : false),
'label' => 'DomainKeys', 'label' => 'DomainKeys',
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(

View File

@@ -31,7 +31,7 @@ return array(
), ),
'customerid' => array( 'customerid' => array(
'label' => $lng['admin']['customer'], 'label' => $lng['admin']['customer'],
'type' => (Settings::Get('panel.allow_domain_change_customer') == '1' ? 'select' : 'label'), 'type' => (\Froxlor\Settings::Get('panel.allow_domain_change_customer') == '1' ? 'select' : 'label'),
'select_var' => (isset($customers) ? $customers : null), 'select_var' => (isset($customers) ? $customers : null),
'value' => (isset($result['customername']) ? $result['customername'] : null), 'value' => (isset($result['customername']) ? $result['customername'] : null),
'mandatory' => true 'mandatory' => true
@@ -39,7 +39,7 @@ return array(
'adminid' => array( 'adminid' => array(
'visible' => ($userinfo['customers_see_all'] == '1' ? true : false), 'visible' => ($userinfo['customers_see_all'] == '1' ? true : false),
'label' => $lng['admin']['admin'], 'label' => $lng['admin']['admin'],
'type' => (Settings::Get('panel.allow_domain_change_admin') == '1' ? 'select' : 'label'), 'type' => (\Froxlor\Settings::Get('panel.allow_domain_change_admin') == '1' ? 'select' : 'label'),
'select_var' => (isset($admins) ? $admins : null), 'select_var' => (isset($admins) ? $admins : null),
'value' => (isset($result['adminname']) ? $result['adminname'] : null), 'value' => (isset($result['adminname']) ? $result['adminname'] : null),
'mandatory' => true 'mandatory' => true
@@ -163,7 +163,7 @@ return array(
) )
), ),
'notryfiles' => array( 'notryfiles' => array(
'visible' => (Settings::Get('system.webserver') == 'nginx' && $userinfo['change_serversettings'] == '1'), 'visible' => (\Froxlor\Settings::Get('system.webserver') == 'nginx' && $userinfo['change_serversettings'] == '1'),
'label' => $lng['admin']['notryfiles']['title'], 'label' => $lng['admin']['notryfiles']['title'],
'desc' => $lng['admin']['notryfiles']['description'], 'desc' => $lng['admin']['notryfiles']['description'],
'type' => 'checkbox', 'type' => 'checkbox',
@@ -206,7 +206,7 @@ return array(
'section_bssl' => array( 'section_bssl' => array(
'title' => $lng['admin']['webserversettings_ssl'], 'title' => $lng['admin']['webserversettings_ssl'],
'image' => 'icons/domain_edit.png', 'image' => 'icons/domain_edit.png',
'visible' => Settings::Get('system.use_ssl') == '1' ? true : false, 'visible' => \Froxlor\Settings::Get('system.use_ssl') == '1' ? true : false,
'fields' => array( 'fields' => array(
'ssl_ipandport' => array( 'ssl_ipandport' => array(
'label' => $lng['domains']['ipandport_ssl_multi']['title'], 'label' => $lng['domains']['ipandport_ssl_multi']['title'],
@@ -232,7 +232,7 @@ return array(
) )
), ),
'letsencrypt' => array( 'letsencrypt' => array(
'visible' => (Settings::Get('system.leenabled') == '1' ? ($ssl_ipsandports != '' ? true : false) : false), 'visible' => (\Froxlor\Settings::Get('system.leenabled') == '1' ? ($ssl_ipsandports != '' ? true : false) : false),
'label' => $lng['admin']['letsencrypt']['title'], 'label' => $lng['admin']['letsencrypt']['title'],
'desc' => $lng['admin']['letsencrypt']['description'], 'desc' => $lng['admin']['letsencrypt']['description'],
'type' => 'checkbox', 'type' => 'checkbox',
@@ -247,7 +247,7 @@ return array(
) )
), ),
'http2' => array( 'http2' => array(
'visible' => ($ssl_ipsandports != '' ? true : false) && Settings::Get('system.webserver') != 'lighttpd' && Settings::Get('system.http2_support') == '1', 'visible' => ($ssl_ipsandports != '' ? true : false) && \Froxlor\Settings::Get('system.webserver') != 'lighttpd' && \Froxlor\Settings::Get('system.http2_support') == '1',
'label' => $lng['admin']['domain_http2']['title'], 'label' => $lng['admin']['domain_http2']['title'],
'desc' => $lng['admin']['domain_http2']['description'], 'desc' => $lng['admin']['domain_http2']['description'],
'type' => 'checkbox', 'type' => 'checkbox',
@@ -308,10 +308,10 @@ return array(
), ),
'ocsp_stapling' => array( 'ocsp_stapling' => array(
'visible' => ($ssl_ipsandports != '' ? true : false) && 'visible' => ($ssl_ipsandports != '' ? true : false) &&
Settings::Get('system.webserver') != 'lighttpd', \Froxlor\Settings::Get('system.webserver') != 'lighttpd',
'label' => $lng['admin']['domain_ocsp_stapling']['title'], 'label' => $lng['admin']['domain_ocsp_stapling']['title'],
'desc' => $lng['admin']['domain_ocsp_stapling']['description'] . 'desc' => $lng['admin']['domain_ocsp_stapling']['description'] .
(Settings::Get('system.webserver') == 'nginx' ? (\Froxlor\Settings::Get('system.webserver') == 'nginx' ?
$lng['admin']['domain_ocsp_stapling']['nginx_version_warning'] : $lng['admin']['domain_ocsp_stapling']['nginx_version_warning'] :
""), ""),
'type' => 'checkbox', 'type' => 'checkbox',
@@ -359,7 +359,7 @@ return array(
) )
), ),
'phpsettingid' => array( 'phpsettingid' => array(
'visible' => (((int) Settings::Get('system.mod_fcgid') == 1 || (int) Settings::Get('phpfpm.enabled') == 1) ? true : false), 'visible' => (((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 || (int) \Froxlor\Settings::Get('phpfpm.enabled') == 1) ? true : false),
'label' => $lng['admin']['phpsettings']['title'], 'label' => $lng['admin']['phpsettings']['title'],
'type' => 'select', 'type' => 'select',
'select_var' => $phpconfigs 'select_var' => $phpconfigs
@@ -380,13 +380,13 @@ return array(
) )
), ),
'mod_fcgid_starter' => array( 'mod_fcgid_starter' => array(
'visible' => ((int) Settings::Get('system.mod_fcgid') == 1 ? true : false), 'visible' => ((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false),
'label' => $lng['admin']['mod_fcgid_starter']['title'], 'label' => $lng['admin']['mod_fcgid_starter']['title'],
'type' => 'text', 'type' => 'text',
'value' => ((int) $result['mod_fcgid_starter'] != - 1 ? $result['mod_fcgid_starter'] : '') 'value' => ((int) $result['mod_fcgid_starter'] != - 1 ? $result['mod_fcgid_starter'] : '')
), ),
'mod_fcgid_maxrequests' => array( 'mod_fcgid_maxrequests' => array(
'visible' => ((int) Settings::Get('system.mod_fcgid') == 1 ? true : false), 'visible' => ((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false),
'label' => $lng['admin']['mod_fcgid_maxrequests']['title'], 'label' => $lng['admin']['mod_fcgid_maxrequests']['title'],
'type' => 'text', 'type' => 'text',
'value' => ((int) $result['mod_fcgid_maxrequests'] != - 1 ? $result['mod_fcgid_maxrequests'] : '') 'value' => ((int) $result['mod_fcgid_maxrequests'] != - 1 ? $result['mod_fcgid_maxrequests'] : '')
@@ -396,7 +396,7 @@ return array(
'section_d' => array( 'section_d' => array(
'title' => $lng['admin']['nameserversettings'], 'title' => $lng['admin']['nameserversettings'],
'image' => 'icons/domain_edit.png', 'image' => 'icons/domain_edit.png',
'visible' => (Settings::Get('system.bind_enable') == '1' && $userinfo['change_serversettings'] == '1' ? true : false), 'visible' => (\Froxlor\Settings::Get('system.bind_enable') == '1' && $userinfo['change_serversettings'] == '1' ? true : false),
'fields' => array( 'fields' => array(
'isbinddomain' => array( 'isbinddomain' => array(
'label' => 'Nameserver', 'label' => 'Nameserver',
@@ -455,7 +455,7 @@ return array(
'select_var' => $subcanemaildomain 'select_var' => $subcanemaildomain
), ),
'dkim' => array( 'dkim' => array(
'visible' => (Settings::Get('dkim.use_dkim') == '1' ? true : false), 'visible' => (\Froxlor\Settings::Get('dkim.use_dkim') == '1' ? true : false),
'label' => 'DomainKeys', 'label' => 'DomainKeys',
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(

View File

@@ -106,7 +106,7 @@ return array(
'section_d' => array( 'section_d' => array(
'title' => $lng['admin']['ipsandports']['webserverssldomainconfig'], 'title' => $lng['admin']['ipsandports']['webserverssldomainconfig'],
'image' => 'icons/ipsports_add.png', 'image' => 'icons/ipsports_add.png',
'visible' => (Settings::Get('system.use_ssl') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('system.use_ssl') == 1 ? true : false),
'fields' => array( 'fields' => array(
'ssl' => array( 'ssl' => array(
'label' => $lng['admin']['ipsandports']['enable_ssl'], 'label' => $lng['admin']['ipsandports']['enable_ssl'],

View File

@@ -111,7 +111,7 @@ return array(
'section_d' => array( 'section_d' => array(
'title' => $lng['admin']['ipsandports']['webserverssldomainconfig'], 'title' => $lng['admin']['ipsandports']['webserverssldomainconfig'],
'image' => 'icons/ipsports_edit.png', 'image' => 'icons/ipsports_edit.png',
'visible' => (Settings::Get('system.use_ssl') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('system.use_ssl') == 1 ? true : false),
'fields' => array( 'fields' => array(
'ssl' => array( 'ssl' => array(
'label' => $lng['admin']['ipsandports']['enable_ssl'], 'label' => $lng['admin']['ipsandports']['enable_ssl'],

View File

@@ -30,20 +30,20 @@ return array(
'maxlength' => 50 'maxlength' => 50
), ),
'binary' => array( 'binary' => array(
'visible' => (Settings::Get('system.mod_fcgid') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false),
'label' => $lng['admin']['phpsettings']['binary'], 'label' => $lng['admin']['phpsettings']['binary'],
'type' => 'text', 'type' => 'text',
'maxlength' => 255, 'maxlength' => 255,
'value' => '/usr/bin/php-cgi' 'value' => '/usr/bin/php-cgi'
), ),
'fpmconfig' => array( 'fpmconfig' => array(
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['admin']['phpsettings']['fpmdesc'], 'label' => $lng['admin']['phpsettings']['fpmdesc'],
'type' => 'select', 'type' => 'select',
'select_var' => $fpmconfigs 'select_var' => $fpmconfigs
), ),
'file_extensions' => array( 'file_extensions' => array(
'visible' => (Settings::Get('system.mod_fcgid') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false),
'label' => $lng['admin']['phpsettings']['file_extensions'], 'label' => $lng['admin']['phpsettings']['file_extensions'],
'desc' => $lng['admin']['phpsettings']['file_extensions_note'], 'desc' => $lng['admin']['phpsettings']['file_extensions_note'],
'type' => 'text', 'type' => 'text',
@@ -51,24 +51,24 @@ return array(
'value' => 'php' 'value' => 'php'
), ),
'mod_fcgid_starter' => array( 'mod_fcgid_starter' => array(
'visible' => (Settings::Get('system.mod_fcgid') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false),
'label' => $lng['admin']['mod_fcgid_starter']['title'], 'label' => $lng['admin']['mod_fcgid_starter']['title'],
'type' => 'text' 'type' => 'text'
), ),
'mod_fcgid_maxrequests' => array( 'mod_fcgid_maxrequests' => array(
'visible' => (Settings::Get('system.mod_fcgid') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false),
'label' => $lng['admin']['mod_fcgid_maxrequests']['title'], 'label' => $lng['admin']['mod_fcgid_maxrequests']['title'],
'type' => 'text' 'type' => 'text'
), ),
'mod_fcgid_umask' => array( 'mod_fcgid_umask' => array(
'visible' => (Settings::Get('system.mod_fcgid') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false),
'label' => $lng['admin']['mod_fcgid_umask']['title'], 'label' => $lng['admin']['mod_fcgid_umask']['title'],
'type' => 'text', 'type' => 'text',
'maxlength' => 3, 'maxlength' => 3,
'value' => '022' 'value' => '022'
), ),
'phpfpm_enable_slowlog' => array( 'phpfpm_enable_slowlog' => array(
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['admin']['phpsettings']['enable_slowlog'], 'label' => $lng['admin']['phpsettings']['enable_slowlog'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(
@@ -77,21 +77,21 @@ return array(
'value' => array() 'value' => array()
), ),
'phpfpm_reqtermtimeout' => array( 'phpfpm_reqtermtimeout' => array(
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['admin']['phpsettings']['request_terminate_timeout'], 'label' => $lng['admin']['phpsettings']['request_terminate_timeout'],
'type' => 'text', 'type' => 'text',
'maxlength' => 10, 'maxlength' => 10,
'value' => '60s' 'value' => '60s'
), ),
'phpfpm_reqslowtimeout' => array( 'phpfpm_reqslowtimeout' => array(
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['admin']['phpsettings']['request_slowlog_timeout'], 'label' => $lng['admin']['phpsettings']['request_slowlog_timeout'],
'type' => 'text', 'type' => 'text',
'maxlength' => 10, 'maxlength' => 10,
'value' => '5s' 'value' => '5s'
), ),
'phpfpm_pass_authorizationheader' => array( 'phpfpm_pass_authorizationheader' => array(
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['admin']['phpsettings']['pass_authorizationheader'], 'label' => $lng['admin']['phpsettings']['pass_authorizationheader'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(
@@ -100,7 +100,7 @@ return array(
'value' => array() 'value' => array()
), ),
'override_fpmconfig' => array( 'override_fpmconfig' => array(
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['serversettings']['phpfpm_settings']['override_fpmconfig'], 'label' => $lng['serversettings']['phpfpm_settings']['override_fpmconfig'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(
@@ -109,56 +109,56 @@ return array(
'value' => array() 'value' => array()
), ),
'pm' => array( 'pm' => array(
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['serversettings']['phpfpm_settings']['pm'], 'label' => $lng['serversettings']['phpfpm_settings']['pm'],
'desc' => $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'], 'desc' => $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'select', 'type' => 'select',
'select_var' => $pm_select 'select_var' => $pm_select
), ),
'max_children' => array( 'max_children' => array(
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['serversettings']['phpfpm_settings']['max_children']['title'], 'label' => $lng['serversettings']['phpfpm_settings']['max_children']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['max_children']['description'].$lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'], 'desc' => $lng['serversettings']['phpfpm_settings']['max_children']['description'].$lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'int', 'type' => 'int',
'value' => 1 'value' => 1
), ),
'start_servers' => array( 'start_servers' => array(
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['serversettings']['phpfpm_settings']['start_servers']['title'], 'label' => $lng['serversettings']['phpfpm_settings']['start_servers']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['start_servers']['description'].$lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'], 'desc' => $lng['serversettings']['phpfpm_settings']['start_servers']['description'].$lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'int', 'type' => 'int',
'value' => 20 'value' => 20
), ),
'min_spare_servers' => array( 'min_spare_servers' => array(
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['serversettings']['phpfpm_settings']['min_spare_servers']['title'], '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'], 'desc' => $lng['serversettings']['phpfpm_settings']['min_spare_servers']['description'].$lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'int', 'type' => 'int',
'value' => 5 'value' => 5
), ),
'max_spare_servers' => array( 'max_spare_servers' => array(
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['serversettings']['phpfpm_settings']['max_spare_servers']['title'], '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'], 'desc' => $lng['serversettings']['phpfpm_settings']['max_spare_servers']['description'].$lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'int', 'type' => 'int',
'value' => 35 'value' => 35
), ),
'max_requests' => array( 'max_requests' => array(
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['serversettings']['phpfpm_settings']['max_requests']['title'], 'label' => $lng['serversettings']['phpfpm_settings']['max_requests']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['max_requests']['description'].$lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'], 'desc' => $lng['serversettings']['phpfpm_settings']['max_requests']['description'].$lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'int', 'type' => 'int',
'value' => 0 'value' => 0
), ),
'idle_timeout' => array( 'idle_timeout' => array(
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['serversettings']['phpfpm_settings']['idle_timeout']['title'], 'label' => $lng['serversettings']['phpfpm_settings']['idle_timeout']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['idle_timeout']['description'].$lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'], 'desc' => $lng['serversettings']['phpfpm_settings']['idle_timeout']['description'].$lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'int', 'type' => 'int',
'value' => 30 'value' => 30
), ),
'limit_extensions' => array( 'limit_extensions' => array(
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['serversettings']['phpfpm_settings']['limit_extensions']['title'], 'label' => $lng['serversettings']['phpfpm_settings']['limit_extensions']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['limit_extensions']['description'].$lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'], 'desc' => $lng['serversettings']['phpfpm_settings']['limit_extensions']['description'].$lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'text', 'type' => 'text',

View File

@@ -31,20 +31,20 @@ return array(
'value' => $result['description'] 'value' => $result['description']
), ),
'binary' => array( 'binary' => array(
'visible' => (Settings::Get('system.mod_fcgid') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false),
'label' => $lng['admin']['phpsettings']['binary'], 'label' => $lng['admin']['phpsettings']['binary'],
'type' => 'text', 'type' => 'text',
'maxlength' => 255, 'maxlength' => 255,
'value' => $result['binary'] 'value' => $result['binary']
), ),
'fpmconfig' => array( 'fpmconfig' => array(
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['admin']['phpsettings']['fpmdesc'], 'label' => $lng['admin']['phpsettings']['fpmdesc'],
'type' => 'select', 'type' => 'select',
'select_var' => $fpmconfigs 'select_var' => $fpmconfigs
), ),
'file_extensions' => array( 'file_extensions' => array(
'visible' => (Settings::Get('system.mod_fcgid') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false),
'label' => $lng['admin']['phpsettings']['file_extensions'], 'label' => $lng['admin']['phpsettings']['file_extensions'],
'desc' => $lng['admin']['phpsettings']['file_extensions_note'], 'desc' => $lng['admin']['phpsettings']['file_extensions_note'],
'type' => 'text', 'type' => 'text',
@@ -52,26 +52,26 @@ return array(
'value' => $result['file_extensions'] 'value' => $result['file_extensions']
), ),
'mod_fcgid_starter' => array( 'mod_fcgid_starter' => array(
'visible' => (Settings::Get('system.mod_fcgid') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false),
'label' => $lng['admin']['mod_fcgid_starter']['title'], 'label' => $lng['admin']['mod_fcgid_starter']['title'],
'type' => 'text', 'type' => 'text',
'value' => ((int)$result['mod_fcgid_starter'] != - 1 ? $result['mod_fcgid_starter'] : '') 'value' => ((int)$result['mod_fcgid_starter'] != - 1 ? $result['mod_fcgid_starter'] : '')
), ),
'mod_fcgid_maxrequests' => array( 'mod_fcgid_maxrequests' => array(
'visible' => (Settings::Get('system.mod_fcgid') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false),
'label' => $lng['admin']['mod_fcgid_maxrequests']['title'], 'label' => $lng['admin']['mod_fcgid_maxrequests']['title'],
'type' => 'text', 'type' => 'text',
'value' => ((int)$result['mod_fcgid_maxrequests'] != - 1 ? $result['mod_fcgid_maxrequests'] : '') 'value' => ((int)$result['mod_fcgid_maxrequests'] != - 1 ? $result['mod_fcgid_maxrequests'] : '')
), ),
'mod_fcgid_umask' => array( 'mod_fcgid_umask' => array(
'visible' => (Settings::Get('system.mod_fcgid') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false),
'label' => $lng['admin']['mod_fcgid_umask']['title'], 'label' => $lng['admin']['mod_fcgid_umask']['title'],
'type' => 'text', 'type' => 'text',
'maxlength' => 3, 'maxlength' => 3,
'value' => $result['mod_fcgid_umask'] 'value' => $result['mod_fcgid_umask']
), ),
'phpfpm_enable_slowlog' => array( 'phpfpm_enable_slowlog' => array(
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['admin']['phpsettings']['enable_slowlog'], 'label' => $lng['admin']['phpsettings']['enable_slowlog'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(
@@ -80,21 +80,21 @@ return array(
'value' => array($result['fpm_slowlog']) 'value' => array($result['fpm_slowlog'])
), ),
'phpfpm_reqtermtimeout' => array( 'phpfpm_reqtermtimeout' => array(
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['admin']['phpsettings']['request_terminate_timeout'], 'label' => $lng['admin']['phpsettings']['request_terminate_timeout'],
'type' => 'text', 'type' => 'text',
'maxlength' => 10, 'maxlength' => 10,
'value' => $result['fpm_reqterm'] 'value' => $result['fpm_reqterm']
), ),
'phpfpm_reqslowtimeout' => array( 'phpfpm_reqslowtimeout' => array(
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['admin']['phpsettings']['request_slowlog_timeout'], 'label' => $lng['admin']['phpsettings']['request_slowlog_timeout'],
'type' => 'text', 'type' => 'text',
'maxlength' => 10, 'maxlength' => 10,
'value' => $result['fpm_reqslow'] 'value' => $result['fpm_reqslow']
), ),
'phpfpm_pass_authorizationheader' => array( 'phpfpm_pass_authorizationheader' => array(
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['admin']['phpsettings']['pass_authorizationheader'], 'label' => $lng['admin']['phpsettings']['pass_authorizationheader'],
'type' => 'checkbox', 'type' => 'checkbox',
'values' => array( 'values' => array(
@@ -111,56 +111,56 @@ return array(
'value' => array($result['override_fpmconfig']) 'value' => array($result['override_fpmconfig'])
), ),
'pm' => array( 'pm' => array(
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['serversettings']['phpfpm_settings']['pm'], 'label' => $lng['serversettings']['phpfpm_settings']['pm'],
'desc' => $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'], 'desc' => $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'select', 'type' => 'select',
'select_var' => $pm_select 'select_var' => $pm_select
), ),
'max_children' => array( 'max_children' => array(
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['serversettings']['phpfpm_settings']['max_children']['title'], 'label' => $lng['serversettings']['phpfpm_settings']['max_children']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['max_children']['description'].$lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'], 'desc' => $lng['serversettings']['phpfpm_settings']['max_children']['description'].$lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'int', 'type' => 'int',
'value' => $result['max_children'] 'value' => $result['max_children']
), ),
'start_servers' => array( 'start_servers' => array(
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['serversettings']['phpfpm_settings']['start_servers']['title'], 'label' => $lng['serversettings']['phpfpm_settings']['start_servers']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['start_servers']['description'].$lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'], 'desc' => $lng['serversettings']['phpfpm_settings']['start_servers']['description'].$lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'int', 'type' => 'int',
'value' => $result['start_servers'] 'value' => $result['start_servers']
), ),
'min_spare_servers' => array( 'min_spare_servers' => array(
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['serversettings']['phpfpm_settings']['min_spare_servers']['title'], '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'], 'desc' => $lng['serversettings']['phpfpm_settings']['min_spare_servers']['description'].$lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'int', 'type' => 'int',
'value' => $result['min_spare_servers'] 'value' => $result['min_spare_servers']
), ),
'max_spare_servers' => array( 'max_spare_servers' => array(
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['serversettings']['phpfpm_settings']['max_spare_servers']['title'], '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'], 'desc' => $lng['serversettings']['phpfpm_settings']['max_spare_servers']['description'].$lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'int', 'type' => 'int',
'value' => $result['max_spare_servers'] 'value' => $result['max_spare_servers']
), ),
'max_requests' => array( 'max_requests' => array(
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['serversettings']['phpfpm_settings']['max_requests']['title'], 'label' => $lng['serversettings']['phpfpm_settings']['max_requests']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['max_requests']['description'].$lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'], 'desc' => $lng['serversettings']['phpfpm_settings']['max_requests']['description'].$lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'int', 'type' => 'int',
'value' => $result['max_requests'] 'value' => $result['max_requests']
), ),
'idle_timeout' => array( 'idle_timeout' => array(
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['serversettings']['phpfpm_settings']['idle_timeout']['title'], 'label' => $lng['serversettings']['phpfpm_settings']['idle_timeout']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['idle_timeout']['description'].$lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'], 'desc' => $lng['serversettings']['phpfpm_settings']['idle_timeout']['description'].$lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'int', 'type' => 'int',
'value' => $result['idle_timeout'] 'value' => $result['idle_timeout']
), ),
'limit_extensions' => array( 'limit_extensions' => array(
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false), 'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'label' => $lng['serversettings']['phpfpm_settings']['limit_extensions']['title'], 'label' => $lng['serversettings']['phpfpm_settings']['limit_extensions']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['limit_extensions']['description'].$lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'], 'desc' => $lng['serversettings']['phpfpm_settings']['limit_extensions']['description'].$lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'text', 'type' => 'text',

View File

@@ -43,18 +43,18 @@ return array(
), ),
'path' => array( 'path' => array(
'label' => $lng['panel']['path'], 'label' => $lng['panel']['path'],
'desc' => (Settings::Get('panel.pathedit') != 'Dropdown' ? $lng['panel']['pathDescriptionSubdomain'] : null).(isset($pathSelect['note']) ? $pathSelect['note'].'<br />'.$pathSelect['value'] : ''), 'desc' => (\Froxlor\Settings::Get('panel.pathedit') != 'Dropdown' ? $lng['panel']['pathDescriptionSubdomain'] : null).(isset($pathSelect['note']) ? $pathSelect['note'].'<br />'.$pathSelect['value'] : ''),
'type' => $pathSelect['type'], 'type' => $pathSelect['type'],
'select_var' => $pathSelect['value'], 'select_var' => $pathSelect['value'],
'value' => $pathSelect['value'] 'value' => $pathSelect['value']
), ),
'url' => array( 'url' => array(
'visible' => (Settings::Get('panel.pathedit') == 'Dropdown' ? true : false), 'visible' => (\Froxlor\Settings::Get('panel.pathedit') == 'Dropdown' ? true : false),
'label' => $lng['panel']['urloverridespath'], 'label' => $lng['panel']['urloverridespath'],
'type' => 'text' 'type' => 'text'
), ),
'redirectcode' => array( 'redirectcode' => array(
'visible' => (Settings::Get('customredirect.enabled') == '1' ? true : false), 'visible' => (\Froxlor\Settings::Get('customredirect.enabled') == '1' ? true : false),
'label' => $lng['domains']['redirectifpathisurl'], 'label' => $lng['domains']['redirectifpathisurl'],
'desc' => $lng['domains']['redirectifpathisurlinfo'], 'desc' => $lng['domains']['redirectifpathisurlinfo'],
'type' => 'select', 'type' => 'select',
@@ -72,7 +72,7 @@ return array(
'select_var' => $openbasedir 'select_var' => $openbasedir
), ),
'phpsettingid' => array( 'phpsettingid' => array(
'visible' => (((int) Settings::Get('system.mod_fcgid') == 1 || (int) Settings::Get('phpfpm.enabled') == 1) && $has_phpconfigs ? true : false), 'visible' => (((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 || (int) \Froxlor\Settings::Get('phpfpm.enabled') == 1) && $has_phpconfigs ? true : false),
'label' => $lng['admin']['phpsettings']['title'], 'label' => $lng['admin']['phpsettings']['title'],
'type' => 'select', 'type' => 'select',
'select_var' => $phpconfigs 'select_var' => $phpconfigs
@@ -82,7 +82,7 @@ return array(
'section_bssl' => array( 'section_bssl' => array(
'title' => $lng['admin']['webserversettings_ssl'], 'title' => $lng['admin']['webserversettings_ssl'],
'image' => 'icons/domain_add.png', 'image' => 'icons/domain_add.png',
'visible' => Settings::Get('system.use_ssl') == '1' ? ($ssl_ipsandports != '' ? true : false) : false, 'visible' => \Froxlor\Settings::Get('system.use_ssl') == '1' ? ($ssl_ipsandports != '' ? true : false) : false,
'fields' => array( 'fields' => array(
'ssl_redirect' => array( 'ssl_redirect' => array(
'label' => $lng['domains']['ssl_redirect']['title'], 'label' => $lng['domains']['ssl_redirect']['title'],
@@ -94,7 +94,7 @@ return array(
'value' => array() 'value' => array()
), ),
'letsencrypt' => array( 'letsencrypt' => array(
'visible' => (Settings::Get('system.leenabled') == '1' ? true : false), 'visible' => (\Froxlor\Settings::Get('system.leenabled') == '1' ? true : false),
'label' => $lng['customer']['letsencrypt']['title'], 'label' => $lng['customer']['letsencrypt']['title'],
'desc' => $lng['customer']['letsencrypt']['description'], 'desc' => $lng['customer']['letsencrypt']['description'],
'type' => 'checkbox', 'type' => 'checkbox',

View File

@@ -42,19 +42,19 @@ return array(
), ),
'path' => array( 'path' => array(
'label' => $lng['panel']['path'], 'label' => $lng['panel']['path'],
'desc' => (Settings::Get('panel.pathedit') != 'Dropdown' ? $lng['panel']['pathDescriptionSubdomain'] : null).(isset($pathSelect['note']) ? '<br />'.$pathSelect['value'] : ''), 'desc' => (\Froxlor\Settings::Get('panel.pathedit') != 'Dropdown' ? $lng['panel']['pathDescriptionSubdomain'] : null).(isset($pathSelect['note']) ? '<br />'.$pathSelect['value'] : ''),
'type' => $pathSelect['type'], 'type' => $pathSelect['type'],
'select_var' => $pathSelect['value'], 'select_var' => $pathSelect['value'],
'value' => $pathSelect['value'] 'value' => $pathSelect['value']
), ),
'url' => array( 'url' => array(
'visible' => (Settings::Get('panel.pathedit') == 'Dropdown' ? true : false), 'visible' => (\Froxlor\Settings::Get('panel.pathedit') == 'Dropdown' ? true : false),
'label' => $lng['panel']['urloverridespath'], 'label' => $lng['panel']['urloverridespath'],
'type' => 'text', 'type' => 'text',
'value' => $urlvalue 'value' => $urlvalue
), ),
'redirectcode' => array( 'redirectcode' => array(
'visible' => (Settings::Get('customredirect.enabled') == '1' ? true : false), 'visible' => (\Froxlor\Settings::Get('customredirect.enabled') == '1' ? true : false),
'label' => $lng['domains']['redirectifpathisurl'], 'label' => $lng['domains']['redirectifpathisurl'],
'desc' => $lng['domains']['redirectifpathisurlinfo'], 'desc' => $lng['domains']['redirectifpathisurlinfo'],
'type' => 'select', 'type' => 'select',
@@ -83,7 +83,7 @@ return array(
'select_var' => $openbasedir 'select_var' => $openbasedir
), ),
'phpsettingid' => array( 'phpsettingid' => array(
'visible' => (((int) Settings::Get('system.mod_fcgid') == 1 || (int) Settings::Get('phpfpm.enabled') == 1) && $has_phpconfigs ? true : false), 'visible' => (((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 || (int) \Froxlor\Settings::Get('phpfpm.enabled') == 1) && $has_phpconfigs ? true : false),
'label' => $lng['admin']['phpsettings']['title'], 'label' => $lng['admin']['phpsettings']['title'],
'type' => 'select', 'type' => 'select',
'select_var' => $phpconfigs 'select_var' => $phpconfigs
@@ -93,7 +93,7 @@ return array(
'section_bssl' => array( 'section_bssl' => array(
'title' => $lng['admin']['webserversettings_ssl'], 'title' => $lng['admin']['webserversettings_ssl'],
'image' => 'icons/domain_edit.png', 'image' => 'icons/domain_edit.png',
'visible' => Settings::Get('system.use_ssl') == '1' ? ($ssl_ipsandports != '' ? (domainHasSslIpPort($result['id']) ? true : false) : false) : false, 'visible' => \Froxlor\Settings::Get('system.use_ssl') == '1' ? ($ssl_ipsandports != '' ? (domainHasSslIpPort($result['id']) ? true : false) : false) : false,
'fields' => array( 'fields' => array(
'ssl_redirect' => array( 'ssl_redirect' => array(
'label' => $lng['domains']['ssl_redirect']['title'], 'label' => $lng['domains']['ssl_redirect']['title'],
@@ -105,7 +105,7 @@ return array(
'value' => array($result['ssl_redirect']) 'value' => array($result['ssl_redirect'])
), ),
'letsencrypt' => array( 'letsencrypt' => array(
'visible' => Settings::Get('system.leenabled') == '1' ? true : false, 'visible' => \Froxlor\Settings::Get('system.leenabled') == '1' ? true : false,
'label' => $lng['customer']['letsencrypt']['title'], 'label' => $lng['customer']['letsencrypt']['title'],
'desc' => $lng['customer']['letsencrypt']['description'], 'desc' => $lng['customer']['letsencrypt']['description'],
'type' => 'checkbox', 'type' => 'checkbox',

View File

@@ -37,8 +37,8 @@ return array(
'email_password_suggestion' => array( 'email_password_suggestion' => array(
'label' => $lng['customer']['generated_pwd'], 'label' => $lng['customer']['generated_pwd'],
'type' => 'text', 'type' => 'text',
'visible' => (Settings::Get('panel.password_regex') == ''), 'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''),
'value' => \Froxlor\System::generatePassword(), 'value' => \Froxlor\System\Crypt::generatePassword(),
) )
) )
) )

View File

@@ -37,18 +37,18 @@ return array(
'email_password_suggestion' => array( 'email_password_suggestion' => array(
'label' => $lng['customer']['generated_pwd'], 'label' => $lng['customer']['generated_pwd'],
'type' => 'text', 'type' => 'text',
'visible' => (Settings::Get('panel.password_regex') == ''), 'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''),
'value' => \Froxlor\System::generatePassword(), 'value' => \Froxlor\System\Crypt::generatePassword(),
), ),
'email_quota' => array( 'email_quota' => array(
'visible' => (Settings::Get('system.mail_quota_enabled') == '1' ? true : false), 'visible' => (\Froxlor\Settings::Get('system.mail_quota_enabled') == '1' ? true : false),
'label' => $lng['emails']['quota'], 'label' => $lng['emails']['quota'],
'desc' => "MiB", 'desc' => "MiB",
'type' => 'text', 'type' => 'text',
'value' => $quota 'value' => $quota
), ),
'alternative_email' => array( 'alternative_email' => array(
'visible' => (Settings::Get('panel.sendalternativemail') == '1' ? true : false), 'visible' => (\Froxlor\Settings::Get('panel.sendalternativemail') == '1' ? true : false),
'label' => $lng['emails']['alternative_emailaddress'], 'label' => $lng['emails']['alternative_emailaddress'],
'type' => 'text' 'type' => 'text'
) )

View File

@@ -43,7 +43,7 @@ return array(
'value' => $lng['panel']['no'].'&nbsp;[<a href="'.$filename.'?page=accounts&amp;action=add&amp;id='.$result['id'].'&amp;s='.$s.'">'.$lng['emails']['account_add'].'</a>]' 'value' => $lng['panel']['no'].'&nbsp;[<a href="'.$filename.'?page=accounts&amp;action=add&amp;id='.$result['id'].'&amp;s='.$s.'">'.$lng['emails']['account_add'].'</a>]'
), ),
'mail_quota' => array( 'mail_quota' => array(
'visible' => ($result['popaccountid'] != 0 && Settings::Get('system.mail_quota_enabled')), 'visible' => ($result['popaccountid'] != 0 && \Froxlor\Settings::Get('system.mail_quota_enabled')),
'label' => $lng['customer']['email_quota'], 'label' => $lng['customer']['email_quota'],
'type' => 'label', 'type' => 'label',
'value' => $result['quota'].' MiB [<a href="'.$filename.'?page=accounts&amp;action=changequota&amp;id='.$result['id'].'&amp;s='.$s.'">'.$lng['emails']['quota_edit'].'</a>]' 'value' => $result['quota'].' MiB [<a href="'.$filename.'?page=accounts&amp;action=changequota&amp;id='.$result['id'].'&amp;s='.$s.'">'.$lng['emails']['quota_edit'].'</a>]'

View File

@@ -25,7 +25,7 @@ return array(
'fields' => array( 'fields' => array(
'path' => array( 'path' => array(
'label' => $lng['panel']['backuppath']['title'], 'label' => $lng['panel']['backuppath']['title'],
'desc' => $lng['panel']['backuppath']['description'].'<br>'.(Settings::Get('panel.pathedit') != 'Dropdown' ? $lng['panel']['pathDescription'] : null).(isset($pathSelect['note']) ? '<br />'.$pathSelect['value'] : ''), 'desc' => $lng['panel']['backuppath']['description'].'<br>'.(\Froxlor\Settings::Get('panel.pathedit') != 'Dropdown' ? $lng['panel']['pathDescription'] : null).(isset($pathSelect['note']) ? '<br />'.$pathSelect['value'] : ''),
'type' => $pathSelect['type'], 'type' => $pathSelect['type'],
'select_var' => $pathSelect['value'], 'select_var' => $pathSelect['value'],
'value' => $pathSelect['value'] 'value' => $pathSelect['value']

View File

@@ -26,7 +26,7 @@ return array(
'fields' => array( 'fields' => array(
'path' => array( 'path' => array(
'label' => $lng['panel']['path'], 'label' => $lng['panel']['path'],
'desc' => (Settings::Get('panel.pathedit') != 'Dropdown' ? $lng['panel']['pathDescription'] : null).(isset($pathSelect['note']) ? '<br />'.$pathSelect['value'] : ''), 'desc' => (\Froxlor\Settings::Get('panel.pathedit') != 'Dropdown' ? $lng['panel']['pathDescription'] : null).(isset($pathSelect['note']) ? '<br />'.$pathSelect['value'] : ''),
'type' => $pathSelect['type'], 'type' => $pathSelect['type'],
'select_var' => $pathSelect['value'], 'select_var' => $pathSelect['value'],
'value' => $pathSelect['value'] 'value' => $pathSelect['value']
@@ -45,13 +45,13 @@ return array(
'type' => 'text' 'type' => 'text'
), ),
'error403path' => array( 'error403path' => array(
'visible' => (Settings::Get('system.webserver') == 'apache2'), 'visible' => (\Froxlor\Settings::Get('system.webserver') == 'apache2'),
'label' => $lng['extras']['errordocument403path'], 'label' => $lng['extras']['errordocument403path'],
'desc' => $lng['panel']['descriptionerrordocument'], 'desc' => $lng['panel']['descriptionerrordocument'],
'type' => 'text' 'type' => 'text'
), ),
'error500path' => array( 'error500path' => array(
'visible' => (Settings::Get('system.webserver') == 'apache2'), 'visible' => (\Froxlor\Settings::Get('system.webserver') == 'apache2'),
'label' => $lng['extras']['errordocument500path'], 'label' => $lng['extras']['errordocument500path'],
'desc' => $lng['panel']['descriptionerrordocument'], 'desc' => $lng['panel']['descriptionerrordocument'],
'type' => 'text' 'type' => 'text'

View File

@@ -44,14 +44,14 @@ return array(
'value' => $result['error404path'] 'value' => $result['error404path']
), ),
'error403path' => array( 'error403path' => array(
'visible' => (Settings::Get('system.webserver') == 'apache2'), 'visible' => (\Froxlor\Settings::Get('system.webserver') == 'apache2'),
'label' => $lng['extras']['errordocument403path'], 'label' => $lng['extras']['errordocument403path'],
'desc' => $lng['panel']['descriptionerrordocument'], 'desc' => $lng['panel']['descriptionerrordocument'],
'type' => 'text', 'type' => 'text',
'value' => $result['error403path'] 'value' => $result['error403path']
), ),
'error500path' => array( 'error500path' => array(
'visible' => (Settings::Get('system.webserver') == 'apache2'), 'visible' => (\Froxlor\Settings::Get('system.webserver') == 'apache2'),
'label' => $lng['extras']['errordocument500path'], 'label' => $lng['extras']['errordocument500path'],
'desc' => $lng['panel']['descriptionerrordocument'], 'desc' => $lng['panel']['descriptionerrordocument'],
'type' => 'text', 'type' => 'text',

View File

@@ -26,7 +26,7 @@ return array(
'fields' => array( 'fields' => array(
'path' => array( 'path' => array(
'label' => $lng['panel']['path'], 'label' => $lng['panel']['path'],
'desc' => (Settings::Get('panel.pathedit') != 'Dropdown' ? $lng['panel']['pathDescription'] : null).(isset($pathSelect['note']) ? '<br />'.$pathSelect['value'] : ''), 'desc' => (\Froxlor\Settings::Get('panel.pathedit') != 'Dropdown' ? $lng['panel']['pathDescription'] : null).(isset($pathSelect['note']) ? '<br />'.$pathSelect['value'] : ''),
'type' => $pathSelect['type'], 'type' => $pathSelect['type'],
'select_var' => $pathSelect['value'], 'select_var' => $pathSelect['value'],
'value' => $pathSelect['value'] 'value' => $pathSelect['value']
@@ -43,8 +43,8 @@ return array(
'directory_password_suggestion' => array( 'directory_password_suggestion' => array(
'label' => $lng['customer']['generated_pwd'], 'label' => $lng['customer']['generated_pwd'],
'type' => 'text', 'type' => 'text',
'visible' => (Settings::Get('panel.password_regex') == ''), 'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''),
'value' => \Froxlor\System::generatePassword(), 'value' => \Froxlor\System\Crypt::generatePassword(),
), ),
'directory_authname' => array( 'directory_authname' => array(
'label' => $lng['extras']['htpasswdauthname'], 'label' => $lng['extras']['htpasswdauthname'],

View File

@@ -42,8 +42,8 @@ return array(
'directory_password_suggestion' => array( 'directory_password_suggestion' => array(
'label' => $lng['customer']['generated_pwd'], 'label' => $lng['customer']['generated_pwd'],
'type' => 'text', 'type' => 'text',
'visible' => (Settings::Get('panel.password_regex') == ''), 'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''),
'value' => \Froxlor\System::generatePassword(), 'value' => \Froxlor\System\Crypt::generatePassword(),
), ),
'directory_authname' => array( 'directory_authname' => array(
'label' => $lng['extras']['htpasswdauthname'], 'label' => $lng['extras']['htpasswdauthname'],

View File

@@ -24,12 +24,12 @@ return array(
'image' => 'icons/user_add.png', 'image' => 'icons/user_add.png',
'fields' => array( 'fields' => array(
'ftp_username' => array( 'ftp_username' => array(
'visible' => (Settings::Get('customer.ftpatdomain') == '1' ? true : false), 'visible' => (\Froxlor\Settings::Get('customer.ftpatdomain') == '1' ? true : false),
'label' => $lng['login']['username'], 'label' => $lng['login']['username'],
'type' => 'text' 'type' => 'text'
), ),
'ftp_domain' => array( 'ftp_domain' => array(
'visible' => (Settings::Get('customer.ftpatdomain') == '1' ? true : false), 'visible' => (\Froxlor\Settings::Get('customer.ftpatdomain') == '1' ? true : false),
'label' => $lng['domains']['domainname'], 'label' => $lng['domains']['domainname'],
'type' => 'select', 'type' => 'select',
'select_var' => (isset($domains) ? $domains : ""), 'select_var' => (isset($domains) ? $domains : ""),
@@ -40,7 +40,7 @@ return array(
), ),
'path' => array( 'path' => array(
'label' => $lng['panel']['path'], 'label' => $lng['panel']['path'],
'desc' => (Settings::Get('panel.pathedit') != 'Dropdown' ? $lng['panel']['pathDescription'] : null).(isset($pathSelect['note']) ? '<br />'.$pathSelect['value'] : ''), 'desc' => (\Froxlor\Settings::Get('panel.pathedit') != 'Dropdown' ? $lng['panel']['pathDescription'] : null).(isset($pathSelect['note']) ? '<br />'.$pathSelect['value'] : ''),
'type' => $pathSelect['type'], 'type' => $pathSelect['type'],
'select_var' => $pathSelect['value'], 'select_var' => $pathSelect['value'],
'value' => $pathSelect['value'] 'value' => $pathSelect['value']
@@ -53,8 +53,8 @@ return array(
'ftp_password_suggestion' => array( 'ftp_password_suggestion' => array(
'label' => $lng['customer']['generated_pwd'], 'label' => $lng['customer']['generated_pwd'],
'type' => 'text', 'type' => 'text',
'visible' => (Settings::Get('panel.password_regex') == ''), 'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''),
'value' => \Froxlor\System::generatePassword(), 'value' => \Froxlor\System\Crypt::generatePassword(),
), ),
'sendinfomail' => array( 'sendinfomail' => array(
'label' => $lng['customer']['sendinfomail'], 'label' => $lng['customer']['sendinfomail'],
@@ -65,7 +65,7 @@ return array(
'value' => array() 'value' => array()
), ),
'shell' => array( 'shell' => array(
'visible' => (Settings::Get('system.allow_customer_shell') == '1' ? true : false), 'visible' => (\Froxlor\Settings::Get('system.allow_customer_shell') == '1' ? true : false),
'label' => $lng['panel']['shell'], 'label' => $lng['panel']['shell'],
'type' => 'select', 'type' => 'select',
'select_var' => (isset($shells) ? $shells : ""), 'select_var' => (isset($shells) ? $shells : ""),

View File

@@ -35,7 +35,7 @@ return array(
), ),
'path' => array( 'path' => array(
'label' => $lng['panel']['path'], 'label' => $lng['panel']['path'],
'desc' => (Settings::Get('panel.pathedit') != 'Dropdown' ? $lng['panel']['pathDescription'] : null).(isset($pathSelect['note']) ? '<br />'.$pathSelect['value'] : ''), 'desc' => (\Froxlor\Settings::Get('panel.pathedit') != 'Dropdown' ? $lng['panel']['pathDescription'] : null).(isset($pathSelect['note']) ? '<br />'.$pathSelect['value'] : ''),
'type' => $pathSelect['type'], 'type' => $pathSelect['type'],
'select_var' => $pathSelect['value'], 'select_var' => $pathSelect['value'],
'value' => $pathSelect['value'] 'value' => $pathSelect['value']
@@ -49,11 +49,11 @@ return array(
'ftp_password_suggestion' => array( 'ftp_password_suggestion' => array(
'label' => $lng['customer']['generated_pwd'], 'label' => $lng['customer']['generated_pwd'],
'type' => 'text', 'type' => 'text',
'visible' => (Settings::Get('panel.password_regex') == ''), 'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''),
'value' => \Froxlor\System::generatePassword(), 'value' => \Froxlor\System\Crypt::generatePassword(),
), ),
'shell' => array( 'shell' => array(
'visible' => (Settings::Get('system.allow_customer_shell') == '1' ? true : false), 'visible' => (\Froxlor\Settings::Get('system.allow_customer_shell') == '1' ? true : false),
'label' => $lng['panel']['shell'], 'label' => $lng['panel']['shell'],
'type' => 'select', 'type' => 'select',
'select_var' => (isset($shells) ? $shells : ""), 'select_var' => (isset($shells) ? $shells : ""),

View File

@@ -40,8 +40,8 @@ return array(
'mysql_password_suggestion' => array( 'mysql_password_suggestion' => array(
'label' => $lng['customer']['generated_pwd'], 'label' => $lng['customer']['generated_pwd'],
'type' => 'text', 'type' => 'text',
'visible' => (Settings::Get('panel.password_regex') == ''), 'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''),
'value' => \Froxlor\System::generatePassword() 'value' => \Froxlor\System\Crypt::generatePassword()
), ),
'sendinfomail' => array( 'sendinfomail' => array(
'label' => $lng['customer']['sendinfomail'], 'label' => $lng['customer']['sendinfomail'],

View File

@@ -46,8 +46,8 @@ return array(
'mysql_password_suggestion' => array( 'mysql_password_suggestion' => array(
'label' => $lng['customer']['generated_pwd'], 'label' => $lng['customer']['generated_pwd'],
'type' => 'text', 'type' => 'text',
'visible' => (Settings::Get('panel.password_regex') == ''), 'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''),
'value' => \Froxlor\System::generatePassword() 'value' => \Froxlor\System\Crypt::generatePassword()
) )
) )
) )

View File

@@ -1,145 +0,0 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Functions
*
*/
function getCronjobsLastRun() {
global $lng;
$query = "SELECT `lastrun`, `desc_lng_key` FROM `".TABLE_PANEL_CRONRUNS."` WHERE `isactive` = '1' ORDER BY `cronfile` ASC";
$result = Database::query($query);
$cronjobs_last_run = '';
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
$lastrun = $lng['cronjobs']['notyetrun'];
if ($row['lastrun'] > 0) {
$lastrun = date('d.m.Y H:i:s', $row['lastrun']);
}
$text = $lng['crondesc'][$row['desc_lng_key']];
$value = $lastrun;
eval("\$cronjobs_last_run .= \"" . getTemplate("index/overview_item") . "\";");
}
return $cronjobs_last_run;
}
function toggleCronStatus($module = null, $isactive = 0) {
if($isactive != 1) {
$isactive = 0;
}
$upd_stmt = Database::prepare("
UPDATE `".TABLE_PANEL_CRONRUNS."` SET `isactive` = :active WHERE `module` = :module"
);
Database::pexecute($upd_stmt, array('active' => $isactive, 'module' => $module));
}
function getOutstandingTasks() {
global $lng;
$query = "SELECT * FROM `".TABLE_PANEL_TASKS."` ORDER BY `type` ASC";
$result = Database::query($query);
$value = '<ul class="cronjobtask">';
$tasks = '';
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
if ($row['data'] != '') {
$row['data'] = json_decode($row['data'], true);
}
// rebuilding webserver-configuration
if ($row['type'] == '1') {
$task_desc = $lng['tasks']['rebuild_webserverconfig'];
}
// adding new user/
elseif ($row['type'] == '2') {
$loginname = '';
if (is_array($row['data'])) {
$loginname = $row['data']['loginname'];
}
$task_desc = $lng['tasks']['adding_customer'];
$task_desc = str_replace('%loginname%', $loginname, $task_desc);
}
// rebuilding bind-configuration
elseif ($row['type'] == '4') {
$task_desc = $lng['tasks']['rebuild_bindconfig'];
}
// creating ftp-user directory
elseif ($row['type'] == '5') {
$task_desc = $lng['tasks']['creating_ftpdir'];
}
// deleting user-files
elseif ($row['type'] == '6') {
$loginname = '';
if (is_array($row['data'])) {
$loginname = $row['data']['loginname'];
}
$task_desc = $lng['tasks']['deleting_customerfiles'];
$task_desc = str_replace('%loginname%', $loginname, $task_desc);
}
// deleting email-account
elseif ($row['type'] == '7') {
$task_desc = $lng['tasks']['remove_emailacc_files'];
}
// deleting ftp-account
elseif ($row['type'] == '8') {
$task_desc = $lng['tasks']['remove_ftpacc_files'];
}
// Set FS - quota
elseif ($row['type'] == '10') {
$task_desc = $lng['tasks']['diskspace_set_quota'];
}
// deleting user-files
elseif ($row['type'] == '20') {
$loginname = '';
if (is_array($row['data'])) {
$loginname = $row['data']['loginname'];
}
$task_desc = $lng['tasks']['backup_customerfiles'];
$task_desc = str_replace('%loginname%', $loginname, $task_desc);
}
// re-generating of cron.d-file
elseif ($row['type'] == '99') {
$task_desc = $lng['tasks']['regenerating_crond'];
}
// unknown
else {
$task_desc = "ERROR: Unknown task type '".$row['type']."'";
}
if($task_desc != '') {
$tasks .= '<li>'.$task_desc.'</li>';
}
}
if (trim($tasks) == '') {
$value .= '<li>'.$lng['tasks']['noneoutstanding'].'</li>';
} else {
$value .= $tasks;
}
$value .= '</ul>';
$text = $lng['tasks']['outstanding_tasks'];
eval("\$outstanding_tasks = \"" . getTemplate("index/overview_item") . "\";");
return $outstanding_tasks;
}

View File

@@ -71,7 +71,7 @@ function validatePasswordLogin($userinfo = null, $password = null, $table = 'pan
UPDATE " . $table . " SET `password` = :newpasswd WHERE `" . $uid . "` = :uid UPDATE " . $table . " SET `password` = :newpasswd WHERE `" . $uid . "` = :uid
"); ");
$params = array ( $params = array (
'newpasswd' => \Froxlor\System::makeCryptPassword($password), 'newpasswd' => \Froxlor\System\Crypt::makeCryptPassword($password),
'uid' => $userinfo[$uid] 'uid' => $userinfo[$uid]
); );
Database::pexecute($upd_stmt, $params); Database::pexecute($upd_stmt, $params);

View File

@@ -377,7 +377,7 @@ class MailsTest extends TestCase
$data = [ $data = [
'emailaddr' => 'info@test2.local', 'emailaddr' => 'info@test2.local',
'email_password' => \Froxlor\System::generatePassword(), 'email_password' => \Froxlor\System\Crypt::generatePassword(),
'alternative_email' => 'noone@example.com', 'alternative_email' => 'noone@example.com',
'email_quota' => 1337, 'email_quota' => 1337,
'sendinfomail' => TRAVIS_CI == 1 ? 0 : 1 'sendinfomail' => TRAVIS_CI == 1 ? 0 : 1
@@ -399,7 +399,7 @@ class MailsTest extends TestCase
$data = [ $data = [
'emailaddr' => 'info@test2.local', 'emailaddr' => 'info@test2.local',
'email_password' => \Froxlor\System::generatePassword(), 'email_password' => \Froxlor\System\Crypt::generatePassword(),
'alternative_email' => 'noone@example.com', 'alternative_email' => 'noone@example.com',
'email_quota' => 1338 'email_quota' => 1338
]; ];
@@ -459,7 +459,7 @@ class MailsTest extends TestCase
// add account // add account
$data = [ $data = [
'emailaddr' => 'info@test2.local', 'emailaddr' => 'info@test2.local',
'email_password' => \Froxlor\System::generatePassword(), 'email_password' => \Froxlor\System\Crypt::generatePassword(),
'alternative_email' => 'noone@example.com', 'alternative_email' => 'noone@example.com',
'sendinfomail' => TRAVIS_CI == 1 ? 0 : 1 'sendinfomail' => TRAVIS_CI == 1 ? 0 : 1
]; ];

View File

@@ -27,7 +27,7 @@ class DirProtectionsTest extends TestCase
$data = [ $data = [
'path' => '/test', 'path' => '/test',
'username' => 'testing', 'username' => 'testing',
'directory_password' => \Froxlor\System::generatePassword(), 'directory_password' => \Froxlor\System\Crypt::generatePassword(),
'directory_authname' => 'test1' 'directory_authname' => 'test1'
]; ];
$json_result = DirProtections::getLocal($customer_userdata, $data)->add(); $json_result = DirProtections::getLocal($customer_userdata, $data)->add();
@@ -49,7 +49,7 @@ class DirProtectionsTest extends TestCase
$data = [ $data = [
'path' => '/test', 'path' => '/test',
'username' => 'testing', 'username' => 'testing',
'directory_password' => \Froxlor\System::generatePassword(), 'directory_password' => \Froxlor\System\Crypt::generatePassword(),
'directory_authname' => 'test2' 'directory_authname' => 'test2'
]; ];
$this->expectExceptionMessage("Combination of username and path already exists"); $this->expectExceptionMessage("Combination of username and path already exists");
@@ -65,7 +65,7 @@ class DirProtectionsTest extends TestCase
'loginname' => 'test1' 'loginname' => 'test1'
))->get(); ))->get();
$customer_userdata = json_decode($json_result, true)['data']; $customer_userdata = json_decode($json_result, true)['data'];
$up = \Froxlor\System::generatePassword(); $up = \Froxlor\System\Crypt::generatePassword();
$data = [ $data = [
'path' => '/test', 'path' => '/test',
'username' => $up, 'username' => $up,
@@ -146,7 +146,7 @@ class DirProtectionsTest extends TestCase
$data = [ $data = [
'id' => 1, 'id' => 1,
'directory_password' => \Froxlor\System::generatePassword(), 'directory_password' => \Froxlor\System\Crypt::generatePassword(),
'directory_authname' => 'test1337' 'directory_authname' => 'test1337'
]; ];
$json_result = DirProtections::getLocal($customer_userdata, $data)->update(); $json_result = DirProtections::getLocal($customer_userdata, $data)->update();

View File

@@ -27,7 +27,7 @@ class MysqlsTest extends TestCase
$customer_userdata = json_decode($json_result, true)['data']; $customer_userdata = json_decode($json_result, true)['data'];
$data = [ $data = [
'mysql_password' => \Froxlor\System::generatePassword(), 'mysql_password' => \Froxlor\System\Crypt::generatePassword(),
'description' => 'testdb', 'description' => 'testdb',
'sendinfomail' => TRAVIS_CI == 1 ? 0 : 1 'sendinfomail' => TRAVIS_CI == 1 ? 0 : 1
]; ];
@@ -103,7 +103,7 @@ class MysqlsTest extends TestCase
$data = [ $data = [
'dbname' => 'test1sql1', 'dbname' => 'test1sql1',
'mysql_password' => \Froxlor\System::generatePassword(), 'mysql_password' => \Froxlor\System\Crypt::generatePassword(),
'description' => 'testdb-upd', 'description' => 'testdb-upd',
'loginname' => 'test1' 'loginname' => 'test1'
]; ];

View File

@@ -69,7 +69,7 @@ Database::query("ALTER TABLE `" . TABLE_PANEL_FPMDAEMONS . "` AUTO_INCREMENT=2;"
// add superadmin // add superadmin
Database::query("INSERT INTO `" . TABLE_PANEL_ADMINS . "` SET Database::query("INSERT INTO `" . TABLE_PANEL_ADMINS . "` SET
`loginname` = 'admin', `loginname` = 'admin',
`password` = '" . makeCryptPassword('admin') . "', `password` = '" . \Froxlor\System\Crypt::makeCryptPassword('admin') . "',
`name` = 'Froxlor-Administrator', `name` = 'Froxlor-Administrator',
`email` = 'admin@dev.froxlor.org', `email` = 'admin@dev.froxlor.org',
`def_language` = 'English', `def_language` = 'English',