Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a37d795ff3 | ||
|
|
d9331cca61 | ||
|
|
f169129e27 | ||
|
|
746548492b | ||
|
|
4ad8b62576 | ||
|
|
1eed3d1166 | ||
|
|
6a32720c9a |
@@ -86,22 +86,18 @@ if (! is_null($month) && ! is_null($year)) {
|
|||||||
|
|
||||||
if (extension_loaded('bcmath')) {
|
if (extension_loaded('bcmath')) {
|
||||||
$traf['ftptext'] = bcdiv($row['ftp_up'], 1024, Settings::Get('panel.decimal_places')) . " MiB up/ " . bcdiv($row['ftp_down'], 1024, Settings::Get('panel.decimal_places')) . " MiB down (FTP)";
|
$traf['ftptext'] = bcdiv($row['ftp_up'], 1024, Settings::Get('panel.decimal_places')) . " MiB up/ " . bcdiv($row['ftp_down'], 1024, Settings::Get('panel.decimal_places')) . " MiB down (FTP)";
|
||||||
$traf['httptext'] = bcdiv($http, 1024, Settings::Get('panel.decimal_places')) . " MiB (HTTP)";
|
|
||||||
$traf['mailtext'] = bcdiv($mail, 1024, Settings::Get('panel.decimal_places')) . " MiB (Mail)";
|
|
||||||
$traf['ftp'] = bcdiv($ftp, 1024, Settings::Get('panel.decimal_places'));
|
$traf['ftp'] = bcdiv($ftp, 1024, Settings::Get('panel.decimal_places'));
|
||||||
$traf['http'] = bcdiv($http, 1024, Settings::Get('panel.decimal_places'));
|
|
||||||
$traf['mail'] = bcdiv($mail, 1024, Settings::Get('panel.decimal_places'));
|
|
||||||
$traf['byte'] = bcdiv($traf['byte'], 1024, Settings::Get('panel.decimal_places'));
|
|
||||||
} else {
|
} else {
|
||||||
$traf['ftptext'] = round($row['ftp_up'] / 1024, Settings::Get('panel.decimal_places')) . " MiB up/ " . round($row['ftp_down'] / 1024, Settings::Get('panel.decimal_places')) . " MiB down (FTP)";
|
$traf['ftptext'] = round($row['ftp_up'] / 1024, Settings::Get('panel.decimal_places')) . " MiB up/ " . round($row['ftp_down'] / 1024, Settings::Get('panel.decimal_places')) . " MiB down (FTP)";
|
||||||
$traf['httptext'] = round($http / 1024, Settings::Get('panel.decimal_places')) . " MiB (HTTP)";
|
$traf['ftp'] = round($ftp / 1024, Settings::Get('panel.decimal_places'));
|
||||||
$traf['mailtext'] = round($mail / 1024, Settings::Get('panel.decimal_places')) . " MiB (Mail)";
|
|
||||||
$traf['http'] = round($http, Settings::Get('panel.decimal_places'));
|
|
||||||
$traf['ftp'] = round($ftp, Settings::Get('panel.decimal_places'));
|
|
||||||
$traf['mail'] = round($mail, Settings::Get('panel.decimal_places'));
|
|
||||||
$traf['byte'] = round($traf['byte'] / 1024, Settings::Get('panel.decimal_places'));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getReadableTraffic($traf,'httptext', $http, 1024, "MiB (HTTP)");
|
||||||
|
getReadableTraffic($traf,'http', $http, 1024);
|
||||||
|
getReadableTraffic($traf,'mailtext', $mail, 1024, "MiB (Mail)");
|
||||||
|
getReadableTraffic($traf,'mail', $mail, 1024);
|
||||||
|
getReadableTraffic($traf,'byte', $traf['byte'], (1024 * 1024));
|
||||||
|
|
||||||
eval("\$traffic.=\"" . \Froxlor\UI\Template::getTemplate('traffic/traffic_month') . "\";");
|
eval("\$traffic.=\"" . \Froxlor\UI\Template::getTemplate('traffic/traffic_month') . "\";");
|
||||||
$show = $lng['traffic']['months'][intval($row['month'])] . ' ' . $row['year'];
|
$show = $lng['traffic']['months'][intval($row['month'])] . ' ' . $row['year'];
|
||||||
}
|
}
|
||||||
@@ -142,22 +138,18 @@ if (! is_null($month) && ! is_null($year)) {
|
|||||||
|
|
||||||
if (extension_loaded('bcmath')) {
|
if (extension_loaded('bcmath')) {
|
||||||
$traf['ftptext'] = bcdiv($ftp_up, 1024, Settings::Get('panel.decimal_places')) . " MiB up/ " . bcdiv($ftp_down, 1024, Settings::Get('panel.decimal_places')) . " MiB down (FTP)";
|
$traf['ftptext'] = bcdiv($ftp_up, 1024, Settings::Get('panel.decimal_places')) . " MiB up/ " . bcdiv($ftp_down, 1024, Settings::Get('panel.decimal_places')) . " MiB down (FTP)";
|
||||||
$traf['httptext'] = bcdiv($http, 1024, Settings::Get('panel.decimal_places')) . " MiB (HTTP)";
|
|
||||||
$traf['mailtext'] = bcdiv($mail, 1024, Settings::Get('panel.decimal_places')) . " MiB (Mail)";
|
|
||||||
$traf['ftp'] = bcdiv(($ftp_up + $ftp_down), 1024, Settings::Get('panel.decimal_places'));
|
$traf['ftp'] = bcdiv(($ftp_up + $ftp_down), 1024, Settings::Get('panel.decimal_places'));
|
||||||
$traf['http'] = bcdiv($http, 1024, Settings::Get('panel.decimal_places'));
|
|
||||||
$traf['mail'] = bcdiv($mail, 1024, Settings::Get('panel.decimal_places'));
|
|
||||||
$traf['byte'] = bcdiv($traf['byte'], 1024 * 1024, Settings::Get('panel.decimal_places'));
|
|
||||||
} else {
|
} else {
|
||||||
$traf['ftptext'] = round($ftp_up / 1024, Settings::Get('panel.decimal_places')) . " MiB up/ " . round($ftp_down / 1024, Settings::Get('panel.decimal_places')) . " MiB down (FTP)";
|
$traf['ftptext'] = round($ftp_up / 1024, Settings::Get('panel.decimal_places')) . " MiB up/ " . round($ftp_down / 1024, Settings::Get('panel.decimal_places')) . " MiB down (FTP)";
|
||||||
$traf['httptext'] = round($http / 1024, Settings::Get('panel.decimal_places')) . " MiB (HTTP)";
|
|
||||||
$traf['mailtext'] = round($mail / 1024, Settings::Get('panel.decimal_places')) . " MiB (Mail)";
|
|
||||||
$traf['ftp'] = round(($ftp_up + $ftp_down) / 1024, Settings::Get('panel.decimal_places'));
|
$traf['ftp'] = round(($ftp_up + $ftp_down) / 1024, Settings::Get('panel.decimal_places'));
|
||||||
$traf['http'] = round($http / 1024, Settings::Get('panel.decimal_places'));
|
|
||||||
$traf['mail'] = round($mail / 1024, Settings::Get('panel.decimal_places'));
|
|
||||||
$traf['byte'] = round($traf['byte'] / (1024 * 1024), Settings::Get('panel.decimal_places'));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getReadableTraffic($traf,'httptext', $http, 1024, "MiB (HTTP)");
|
||||||
|
getReadableTraffic($traf,'http', $http, 1024);
|
||||||
|
getReadableTraffic($traf,'mailtext', $mail, 1024, "MiB (Mail)");
|
||||||
|
getReadableTraffic($traf,'mail', $mail, 1024);
|
||||||
|
getReadableTraffic($traf,'byte', $traf['byte'], (1024 * 1024));
|
||||||
|
|
||||||
eval("\$traffic.=\"" . \Froxlor\UI\Template::getTemplate('traffic/traffic_traffic') . "\";");
|
eval("\$traffic.=\"" . \Froxlor\UI\Template::getTemplate('traffic/traffic_traffic') . "\";");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -167,3 +159,12 @@ if (! is_null($month) && ! is_null($year)) {
|
|||||||
|
|
||||||
eval("echo \"" . \Froxlor\UI\Template::getTemplate('traffic/traffic') . "\";");
|
eval("echo \"" . \Froxlor\UI\Template::getTemplate('traffic/traffic') . "\";");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getReadableTraffic(&$traf, $index, $value, $divisor, $desc = "")
|
||||||
|
{
|
||||||
|
if (extension_loaded('bcmath')) {
|
||||||
|
$traf[$index] = bcdiv($value, $divisor,Settings::Get('panel.decimal_places')).(!empty($desc) ? " ".$desc : "");
|
||||||
|
} else {
|
||||||
|
$traf[$index] = round($value / $divisor, Settings::Get('panel.decimal_places')).(!empty($desc) ? " ".$desc : "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -704,8 +704,8 @@ opcache.interned_strings_buffer'),
|
|||||||
('panel', 'password_special_char', '!?<>§$%+#=@'),
|
('panel', 'password_special_char', '!?<>§$%+#=@'),
|
||||||
('panel', 'customer_hide_options', ''),
|
('panel', 'customer_hide_options', ''),
|
||||||
('panel', 'is_configured', '0'),
|
('panel', 'is_configured', '0'),
|
||||||
('panel', 'version', '0.10.20'),
|
('panel', 'version', '0.10.21'),
|
||||||
('panel', 'db_version', '202007240');
|
('panel', 'db_version', '202009070');
|
||||||
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `panel_tasks`;
|
DROP TABLE IF EXISTS `panel_tasks`;
|
||||||
@@ -786,23 +786,6 @@ CREATE TABLE `panel_diskspace` (
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `panel_diskspace_admins`;
|
|
||||||
CREATE TABLE `panel_diskspace_admins` (
|
|
||||||
`id` int(11) unsigned NOT NULL auto_increment,
|
|
||||||
`adminid` int(11) unsigned NOT NULL default '0',
|
|
||||||
`year` int(4) unsigned zerofill NOT NULL default '0000',
|
|
||||||
`month` int(2) unsigned zerofill NOT NULL default '00',
|
|
||||||
`day` int(2) unsigned zerofill NOT NULL default '00',
|
|
||||||
`stamp` int(11) unsigned NOT NULL default '0',
|
|
||||||
`webspace` bigint(30) unsigned NOT NULL default '0',
|
|
||||||
`mail` bigint(30) unsigned NOT NULL default '0',
|
|
||||||
`mysql` bigint(30) unsigned NOT NULL default '0',
|
|
||||||
PRIMARY KEY (`id`),
|
|
||||||
KEY `adminid` (`adminid`)
|
|
||||||
) ENGINE=InnoDB CHARSET=utf8 COLLATE=utf8_general_ci;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `panel_languages`;
|
DROP TABLE IF EXISTS `panel_languages`;
|
||||||
CREATE TABLE `panel_languages` (
|
CREATE TABLE `panel_languages` (
|
||||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
|||||||
@@ -668,3 +668,17 @@ if (\Froxlor\Froxlor::isFroxlorVersion('0.10.19')) {
|
|||||||
showUpdateStep("Updating from 0.10.19 to 0.10.20", false);
|
showUpdateStep("Updating from 0.10.19 to 0.10.20", false);
|
||||||
\Froxlor\Froxlor::updateToVersion('0.10.20');
|
\Froxlor\Froxlor::updateToVersion('0.10.20');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (\Froxlor\Froxlor::isDatabaseVersion('202007240')) {
|
||||||
|
|
||||||
|
showUpdateStep("Removing old unused table", true);
|
||||||
|
Database::query("DROP TABLE IF EXISTS `panel_diskspace_admins`;");
|
||||||
|
lastStepStatus(0);
|
||||||
|
|
||||||
|
\Froxlor\Froxlor::updateToDbVersion('202009070');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (\Froxlor\Froxlor::isFroxlorVersion('0.10.20')) {
|
||||||
|
showUpdateStep("Updating from 0.10.20 to 0.10.21", false);
|
||||||
|
\Froxlor\Froxlor::updateToVersion('0.10.21');
|
||||||
|
}
|
||||||
|
|||||||
@@ -730,14 +730,6 @@ class Admins extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEnt
|
|||||||
'adminid' => $id
|
'adminid' => $id
|
||||||
), true, true);
|
), true, true);
|
||||||
|
|
||||||
// delete the diskspace usage
|
|
||||||
$del_stmt = Database::prepare("
|
|
||||||
DELETE FROM `" . TABLE_PANEL_DISKSPACE_ADMINS . "` WHERE `adminid` = :adminid
|
|
||||||
");
|
|
||||||
Database::pexecute($del_stmt, array(
|
|
||||||
'adminid' => $id
|
|
||||||
), true, true);
|
|
||||||
|
|
||||||
// set admin-id of the old admin's customer to current admins
|
// set admin-id of the old admin's customer to current admins
|
||||||
$upd_stmt = Database::prepare("
|
$upd_stmt = Database::prepare("
|
||||||
UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET
|
UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET
|
||||||
|
|||||||
@@ -195,18 +195,18 @@ abstract class DnsBase
|
|||||||
|
|
||||||
while ($domain = $result_domains_stmt->fetch(\PDO::FETCH_ASSOC)) {
|
while ($domain = $result_domains_stmt->fetch(\PDO::FETCH_ASSOC)) {
|
||||||
|
|
||||||
$privkey_filename = \Froxlor\FileDir::makeCorrectFile(Settings::Get('dkim.dkim_prefix') . '/dkim_' . $domain['dkim_id']);
|
$privkey_filename = \Froxlor\FileDir::makeCorrectFile(Settings::Get('dkim.dkim_prefix') . '/dkim' . $domain['dkim_id']);
|
||||||
$pubkey_filename = \Froxlor\FileDir::makeCorrectFile(Settings::Get('dkim.dkim_prefix') . '/dkim_' . $domain['dkim_id'] . '.public');
|
$pubkey_filename = \Froxlor\FileDir::makeCorrectFile(Settings::Get('dkim.dkim_prefix') . '/dkim' . $domain['dkim_id'] . '.public');
|
||||||
|
|
||||||
if ($domain['dkim_privkey'] == '' || $domain['dkim_pubkey'] == '') {
|
if ($domain['dkim_privkey'] == '' || $domain['dkim_pubkey'] == '') {
|
||||||
$max_dkim_id_stmt = Database::query("SELECT MAX(`dkim_id`) as `max_dkim_id` FROM `" . TABLE_PANEL_DOMAINS . "`");
|
$max_dkim_id_stmt = Database::query("SELECT MAX(`dkim_id`) as `max_dkim_id` FROM `" . TABLE_PANEL_DOMAINS . "`");
|
||||||
$max_dkim_id = $max_dkim_id_stmt->fetch(\PDO::FETCH_ASSOC);
|
$max_dkim_id = $max_dkim_id_stmt->fetch(\PDO::FETCH_ASSOC);
|
||||||
$domain['dkim_id'] = (int) $max_dkim_id['max_dkim_id'] + 1;
|
$domain['dkim_id'] = (int) $max_dkim_id['max_dkim_id'] + 1;
|
||||||
$privkey_filename = \Froxlor\FileDir::makeCorrectFile(Settings::Get('dkim.dkim_prefix') . '/dkim_' . $domain['dkim_id']);
|
$privkey_filename = \Froxlor\FileDir::makeCorrectFile(Settings::Get('dkim.dkim_prefix') . '/dkim' . $domain['dkim_id']);
|
||||||
\Froxlor\FileDir::safe_exec('openssl genrsa -out ' . escapeshellarg($privkey_filename) . ' ' . Settings::Get('dkim.dkim_keylength'));
|
\Froxlor\FileDir::safe_exec('openssl genrsa -out ' . escapeshellarg($privkey_filename) . ' ' . Settings::Get('dkim.dkim_keylength'));
|
||||||
$domain['dkim_privkey'] = file_get_contents($privkey_filename);
|
$domain['dkim_privkey'] = file_get_contents($privkey_filename);
|
||||||
\Froxlor\FileDir::safe_exec("chmod 0640 " . escapeshellarg($privkey_filename));
|
\Froxlor\FileDir::safe_exec("chmod 0640 " . escapeshellarg($privkey_filename));
|
||||||
$pubkey_filename = \Froxlor\FileDir::makeCorrectFile(Settings::Get('dkim.dkim_prefix') . '/dkim_' . $domain['dkim_id'] . '.public');
|
$pubkey_filename = \Froxlor\FileDir::makeCorrectFile(Settings::Get('dkim.dkim_prefix') . '/dkim' . $domain['dkim_id'] . '.public');
|
||||||
\Froxlor\FileDir::safe_exec('openssl rsa -in ' . escapeshellarg($privkey_filename) . ' -pubout -outform pem -out ' . escapeshellarg($pubkey_filename));
|
\Froxlor\FileDir::safe_exec('openssl rsa -in ' . escapeshellarg($privkey_filename) . ' -pubout -outform pem -out ' . escapeshellarg($pubkey_filename));
|
||||||
$domain['dkim_pubkey'] = file_get_contents($pubkey_filename);
|
$domain['dkim_pubkey'] = file_get_contents($pubkey_filename);
|
||||||
\Froxlor\FileDir::safe_exec("chmod 0664 " . escapeshellarg($pubkey_filename));
|
\Froxlor\FileDir::safe_exec("chmod 0664 " . escapeshellarg($pubkey_filename));
|
||||||
|
|||||||
@@ -413,7 +413,8 @@ class Apache extends HttpConfigBase
|
|||||||
$this->virtualhosts_data[$vhosts_filename] .= $this->processSpecialConfigTemplate($row_ipsandports['ssl_specialsettings'], $domain, $row_ipsandports['ip'], $row_ipsandports['port'], $row_ipsandports['ssl'] == '1') . "\n";
|
$this->virtualhosts_data[$vhosts_filename] .= $this->processSpecialConfigTemplate($row_ipsandports['ssl_specialsettings'], $domain, $row_ipsandports['ip'], $row_ipsandports['port'], $row_ipsandports['ssl'] == '1') . "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($row_ipsandports['ssl_cert_file'] == '') {
|
// check for required fallback
|
||||||
|
if (($row_ipsandports['ssl_cert_file'] == '' || ! file_exists($row_ipsandports['ssl_cert_file'])) && (Settings::Get('system.le_froxlor_enabled') == '0' || $this->froxlorVhostHasLetsEncryptCert() == false)) {
|
||||||
$row_ipsandports['ssl_cert_file'] = Settings::Get('system.ssl_cert_file');
|
$row_ipsandports['ssl_cert_file'] = Settings::Get('system.ssl_cert_file');
|
||||||
if (! file_exists($row_ipsandports['ssl_cert_file'])) {
|
if (! file_exists($row_ipsandports['ssl_cert_file'])) {
|
||||||
// explicitly disable ssl for this vhost
|
// explicitly disable ssl for this vhost
|
||||||
@@ -950,7 +951,7 @@ class Apache extends HttpConfigBase
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($ssl_vhost === true && $domain['ssl'] == '1' && Settings::Get('system.use_ssl') == '1') {
|
if ($ssl_vhost === true && $domain['ssl'] == '1' && Settings::Get('system.use_ssl') == '1') {
|
||||||
if ($domain['ssl_cert_file'] == '') {
|
if ($domain['ssl_cert_file'] == '' || ! file_exists($domain['ssl_cert_file'])) {
|
||||||
$domain['ssl_cert_file'] = Settings::Get('system.ssl_cert_file');
|
$domain['ssl_cert_file'] = Settings::Get('system.ssl_cert_file');
|
||||||
if (! file_exists($domain['ssl_cert_file'])) {
|
if (! file_exists($domain['ssl_cert_file'])) {
|
||||||
// explicitly disable ssl for this vhost
|
// explicitly disable ssl for this vhost
|
||||||
|
|||||||
@@ -502,7 +502,7 @@ class AcmeSh extends \Froxlor\Cron\FroxlorCron
|
|||||||
|
|
||||||
if (is_dir($certificate_folder) && file_exists($ssl_file) && is_readable($ssl_file)) {
|
if (is_dir($certificate_folder) && file_exists($ssl_file) && is_readable($ssl_file)) {
|
||||||
$cert_data = openssl_x509_parse(file_get_contents($ssl_file));
|
$cert_data = openssl_x509_parse(file_get_contents($ssl_file));
|
||||||
if ($cert_data['validTo_time_t'] > strtotime($cert_date)) {
|
if ($cert_data && $cert_data['validTo_time_t'] > strtotime($cert_date)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -188,7 +188,8 @@ class Lighttpd extends HttpConfigBase
|
|||||||
$this->lighttpd_data[$vhost_filename] .= $this->processSpecialConfigTemplate($row_ipsandports['ssl_specialsettings'], $domain, $row_ipsandports['ip'], $row_ipsandports['port'], $row_ipsandports['ssl'] == '1') . "\n";
|
$this->lighttpd_data[$vhost_filename] .= $this->processSpecialConfigTemplate($row_ipsandports['ssl_specialsettings'], $domain, $row_ipsandports['ip'], $row_ipsandports['port'], $row_ipsandports['ssl'] == '1') . "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($row_ipsandports['ssl_cert_file'] == '') {
|
// check for required fallback
|
||||||
|
if (($row_ipsandports['ssl_cert_file'] == '' || ! file_exists($row_ipsandports['ssl_cert_file'])) && (Settings::Get('system.le_froxlor_enabled') == '0' || $this->froxlorVhostHasLetsEncryptCert() == false)) {
|
||||||
$row_ipsandports['ssl_cert_file'] = Settings::Get('system.ssl_cert_file');
|
$row_ipsandports['ssl_cert_file'] = Settings::Get('system.ssl_cert_file');
|
||||||
if (! file_exists($row_ipsandports['ssl_cert_file'])) {
|
if (! file_exists($row_ipsandports['ssl_cert_file'])) {
|
||||||
// explicitly disable ssl for this vhost
|
// explicitly disable ssl for this vhost
|
||||||
@@ -555,7 +556,7 @@ class Lighttpd extends HttpConfigBase
|
|||||||
$ssl_settings = '';
|
$ssl_settings = '';
|
||||||
|
|
||||||
if ($ssl_vhost === true && $domain['ssl'] == '1' && (int) Settings::Get('system.use_ssl') == 1) {
|
if ($ssl_vhost === true && $domain['ssl'] == '1' && (int) Settings::Get('system.use_ssl') == 1) {
|
||||||
if ($domain['ssl_cert_file'] == '') {
|
if ($domain['ssl_cert_file'] == '' || ! file_exists($domain['ssl_cert_file'])) {
|
||||||
$domain['ssl_cert_file'] = Settings::Get('system.ssl_cert_file');
|
$domain['ssl_cert_file'] = Settings::Get('system.ssl_cert_file');
|
||||||
if (! file_exists($domain['ssl_cert_file'])) {
|
if (! file_exists($domain['ssl_cert_file'])) {
|
||||||
// explicitly disable ssl for this vhost
|
// explicitly disable ssl for this vhost
|
||||||
|
|||||||
@@ -155,7 +155,8 @@ class Nginx extends HttpConfigBase
|
|||||||
// we know whether it's an ssl vhost or not
|
// we know whether it's an ssl vhost or not
|
||||||
$ssl_vhost = false;
|
$ssl_vhost = false;
|
||||||
if ($row_ipsandports['ssl'] == '1') {
|
if ($row_ipsandports['ssl'] == '1') {
|
||||||
if ($row_ipsandports['ssl_cert_file'] == '') {
|
// check for required fallback
|
||||||
|
if (($row_ipsandports['ssl_cert_file'] == '' || ! file_exists($row_ipsandports['ssl_cert_file'])) && (Settings::Get('system.le_froxlor_enabled') == '0' || $this->froxlorVhostHasLetsEncryptCert() == false)) {
|
||||||
$row_ipsandports['ssl_cert_file'] = Settings::Get('system.ssl_cert_file');
|
$row_ipsandports['ssl_cert_file'] = Settings::Get('system.ssl_cert_file');
|
||||||
if (! file_exists($row_ipsandports['ssl_cert_file'])) {
|
if (! file_exists($row_ipsandports['ssl_cert_file'])) {
|
||||||
// explicitly disable ssl for this vhost
|
// explicitly disable ssl for this vhost
|
||||||
@@ -659,7 +660,7 @@ class Nginx extends HttpConfigBase
|
|||||||
{
|
{
|
||||||
$sslsettings = '';
|
$sslsettings = '';
|
||||||
|
|
||||||
if ($domain_or_ip['ssl_cert_file'] == '') {
|
if ($domain_or_ip['ssl_cert_file'] == '' || ! file_exists($domain_or_ip['ssl_cert_file'])) {
|
||||||
$domain_or_ip['ssl_cert_file'] = Settings::Get('system.ssl_cert_file');
|
$domain_or_ip['ssl_cert_file'] = Settings::Get('system.ssl_cert_file');
|
||||||
if (! file_exists($domain_or_ip['ssl_cert_file'])) {
|
if (! file_exists($domain_or_ip['ssl_cert_file'])) {
|
||||||
// explicitly disable ssl for this vhost
|
// explicitly disable ssl for this vhost
|
||||||
|
|||||||
@@ -570,29 +570,6 @@ class TrafficCron extends \Froxlor\Cron\FroxlorCron
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isset($admin_diskspace[$row['adminid']])) {
|
if (isset($admin_diskspace[$row['adminid']])) {
|
||||||
|
|
||||||
$ins_data = array(
|
|
||||||
'adminid' => $row['adminid'],
|
|
||||||
'year' => date('Y', time()),
|
|
||||||
'month' => date('m', time()),
|
|
||||||
'day' => date('d', time()),
|
|
||||||
'stamp' => time(),
|
|
||||||
'webspace' => $admin_diskspace[$row['adminid']]['webspace'],
|
|
||||||
'mail' => $admin_diskspace[$row['adminid']]['mail'],
|
|
||||||
'mysql' => $admin_diskspace[$row['adminid']]['mysql']
|
|
||||||
);
|
|
||||||
$ins_stmt = Database::prepare("
|
|
||||||
INSERT INTO `" . TABLE_PANEL_DISKSPACE_ADMINS . "` SET
|
|
||||||
`adminid` = :adminid,
|
|
||||||
`year` = :year,
|
|
||||||
`month` = :month,
|
|
||||||
`day` = :day,
|
|
||||||
`stamp` = :stamp,
|
|
||||||
`webspace` = :webspace,
|
|
||||||
`mail` = :mail,
|
|
||||||
`mysql` = :mysql
|
|
||||||
");
|
|
||||||
|
|
||||||
$upd_data = array(
|
$upd_data = array(
|
||||||
'diskspace' => $admin_diskspace[$row['adminid']]['all'],
|
'diskspace' => $admin_diskspace[$row['adminid']]['all'],
|
||||||
'adminid' => $row['adminid']
|
'adminid' => $row['adminid']
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ final class Froxlor
|
|||||||
{
|
{
|
||||||
|
|
||||||
// Main version variable
|
// Main version variable
|
||||||
const VERSION = '0.10.20';
|
const VERSION = '0.10.21';
|
||||||
|
|
||||||
// Database version (YYYYMMDDC where C is a daily counter)
|
// Database version (YYYYMMDDC where C is a daily counter)
|
||||||
const DBVERSION = '202007240';
|
const DBVERSION = '202009070';
|
||||||
|
|
||||||
// Distribution branding-tag (used for Debian etc.)
|
// Distribution branding-tag (used for Debian etc.)
|
||||||
const BRANDING = '';
|
const BRANDING = '';
|
||||||
|
|||||||
@@ -37,7 +37,6 @@ define('TABLE_PANEL_TEMPLATES', 'panel_templates');
|
|||||||
define('TABLE_PANEL_TRAFFIC', 'panel_traffic');
|
define('TABLE_PANEL_TRAFFIC', 'panel_traffic');
|
||||||
define('TABLE_PANEL_TRAFFIC_ADMINS', 'panel_traffic_admins');
|
define('TABLE_PANEL_TRAFFIC_ADMINS', 'panel_traffic_admins');
|
||||||
define('TABLE_PANEL_DISKSPACE', 'panel_diskspace');
|
define('TABLE_PANEL_DISKSPACE', 'panel_diskspace');
|
||||||
define('TABLE_PANEL_DISKSPACE_ADMINS', 'panel_diskspace_admins');
|
|
||||||
define('TABLE_PANEL_LANGUAGE', 'panel_languages');
|
define('TABLE_PANEL_LANGUAGE', 'panel_languages');
|
||||||
define('TABLE_PANEL_IPSANDPORTS', 'panel_ipsandports');
|
define('TABLE_PANEL_IPSANDPORTS', 'panel_ipsandports');
|
||||||
define('TABLE_PANEL_LOG', 'panel_syslog');
|
define('TABLE_PANEL_LOG', 'panel_syslog');
|
||||||
|
|||||||
28
templates/Sparkle/assets/js/traffic.js
vendored
28
templates/Sparkle/assets/js/traffic.js
vendored
@@ -19,8 +19,8 @@ $(document).ready(function() {
|
|||||||
} else {
|
} else {
|
||||||
ticks.push([i, $(row).children().first().html()]);
|
ticks.push([i, $(row).children().first().html()]);
|
||||||
}
|
}
|
||||||
ftp.push([i, parseFloat(ftpd / 1024)]);
|
ftp.push([i, parseFloat(ftpd)]);
|
||||||
http.push([i, parseFloat(httpd / 1024)]);
|
http.push([i, parseFloat(httpd)]);
|
||||||
mail.push([i, parseFloat(maild)]);
|
mail.push([i, parseFloat(maild)]);
|
||||||
i++;
|
i++;
|
||||||
});
|
});
|
||||||
@@ -107,24 +107,16 @@ $(document).ready(function() {
|
|||||||
"font-size": "11px"
|
"font-size": "11px"
|
||||||
}).appendTo("body");
|
}).appendTo("body");
|
||||||
|
|
||||||
$("#ftpchart, #httpchart").bind("plothover", function(event, pos, item) {
|
$("#ftpchart, #httpchart, #mailchart").bind("plothover", function(event, pos, item) {
|
||||||
if (item) {
|
if (item) {
|
||||||
var y = item.datapoint[1].toFixed(2);
|
var y = item.datapoint[1];
|
||||||
|
var unit = 'MiB';
|
||||||
|
if (y > 1024) {
|
||||||
|
y /= 1024;
|
||||||
|
unit = 'GiB';
|
||||||
|
}
|
||||||
|
|
||||||
$("#tooltip").html(item.series.label + ": " + y + " GiB").css({
|
$("#tooltip").html(item.series.label + ": " + y.toFixed(2) + " " + unit).css({
|
||||||
top: item.pageY + 5,
|
|
||||||
left: item.pageX - $("#tooltip").width() / 2
|
|
||||||
}).fadeIn(200);
|
|
||||||
} else {
|
|
||||||
$("#tooltip").hide();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#mailchart").bind("plothover", function(event, pos, item) {
|
|
||||||
if (item) {
|
|
||||||
var y = item.datapoint[1].toFixed(2);
|
|
||||||
|
|
||||||
$("#tooltip").html(item.series.label + ": " + y + " MiB").css({
|
|
||||||
top: item.pageY + 5,
|
top: item.pageY + 5,
|
||||||
left: item.pageX - $("#tooltip").width() / 2
|
left: item.pageX - $("#tooltip").width() / 2
|
||||||
}).fadeIn(200);
|
}).fadeIn(200);
|
||||||
|
|||||||
@@ -63,7 +63,6 @@ Database::query("TRUNCATE TABLE `" . TABLE_FTP_QUOTATALLIES . "`;");
|
|||||||
Database::query("TRUNCATE TABLE `" . TABLE_MAIL_VIRTUAL . "`;");
|
Database::query("TRUNCATE TABLE `" . TABLE_MAIL_VIRTUAL . "`;");
|
||||||
Database::query("TRUNCATE TABLE `" . TABLE_MAIL_USERS . "`;");
|
Database::query("TRUNCATE TABLE `" . TABLE_MAIL_USERS . "`;");
|
||||||
Database::query("TRUNCATE TABLE `" . TABLE_PANEL_DISKSPACE . "`;");
|
Database::query("TRUNCATE TABLE `" . TABLE_PANEL_DISKSPACE . "`;");
|
||||||
Database::query("TRUNCATE TABLE `" . TABLE_PANEL_DISKSPACE_ADMINS . "`;");
|
|
||||||
Database::query("TRUNCATE TABLE `" . TABLE_PANEL_TRAFFIC . "`;");
|
Database::query("TRUNCATE TABLE `" . TABLE_PANEL_TRAFFIC . "`;");
|
||||||
Database::query("TRUNCATE TABLE `" . TABLE_PANEL_TRAFFIC_ADMINS . "`;");
|
Database::query("TRUNCATE TABLE `" . TABLE_PANEL_TRAFFIC_ADMINS . "`;");
|
||||||
Database::query("TRUNCATE TABLE `" . TABLE_PANEL_TASKS . "`;");
|
Database::query("TRUNCATE TABLE `" . TABLE_PANEL_TASKS . "`;");
|
||||||
|
|||||||
Reference in New Issue
Block a user