Compare commits
115 Commits
0.9.35-rc1
...
0.9.36
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9d16790f5b | ||
|
|
6ea4655fd8 | ||
|
|
eb70e619c9 | ||
|
|
41e4135f71 | ||
|
|
b03eab897a | ||
|
|
25ff78e295 | ||
|
|
6e2b1773a3 | ||
|
|
f3e05742b5 | ||
|
|
001f10f74e | ||
|
|
712aebb864 | ||
|
|
0ae0178b4c | ||
|
|
1d4211a5ce | ||
|
|
da785500cc | ||
|
|
bb9331904e | ||
|
|
6369e160b8 | ||
|
|
5e09d56871 | ||
|
|
0e79e8d670 | ||
|
|
941a25ec9d | ||
|
|
2210d3de12 | ||
|
|
ae01f2cdb9 | ||
|
|
e8e980509f | ||
|
|
b2cd992f92 | ||
|
|
7c44c5ea75 | ||
|
|
b1446d366e | ||
|
|
9bfd5eb17e | ||
|
|
fb555027fd | ||
|
|
05974de4d5 | ||
|
|
9c9bbb81de | ||
|
|
ef7da53806 | ||
|
|
a26ebb375b | ||
|
|
c8bbefb2bb | ||
|
|
a485d9f4f9 | ||
|
|
f8be36d229 | ||
|
|
28f0c3eac4 | ||
|
|
e8f5fc1a8a | ||
|
|
a014b5cc2b | ||
|
|
84f1d94ad6 | ||
|
|
8565dbce8b | ||
|
|
72d1282651 | ||
|
|
d474f2ec8f | ||
|
|
252b42ee57 | ||
|
|
0dfaf376c0 | ||
|
|
2a05b89cc8 | ||
|
|
576c94f83c | ||
|
|
5331127204 | ||
|
|
57f9c439f2 | ||
|
|
c14017c244 | ||
|
|
82cd5986a0 | ||
|
|
032a991b8f | ||
|
|
200f589252 | ||
|
|
3405c7e313 | ||
|
|
30bd81064c | ||
|
|
924a607183 | ||
|
|
f1460d169d | ||
|
|
f5e2afaa0a | ||
|
|
228d07ca66 | ||
|
|
3294bbf9b4 | ||
|
|
a849f35469 | ||
|
|
104383d31e | ||
|
|
1dd9bcbbe0 | ||
|
|
05d57a8af7 | ||
|
|
630ecfb148 | ||
|
|
d545734072 | ||
|
|
c903b759bb | ||
|
|
579854f5a5 | ||
|
|
6b032839ce | ||
|
|
be1d9a045a | ||
|
|
8bc19e3893 | ||
|
|
f9740ff545 | ||
|
|
2b2ca99a2b | ||
|
|
641ee1f8a6 | ||
|
|
52448571ea | ||
|
|
7bba4112b9 | ||
|
|
efd64300c4 | ||
|
|
1f3c208f95 | ||
|
|
4330b08c04 | ||
|
|
1c80118117 | ||
|
|
65fd6ac191 | ||
|
|
291fae1744 | ||
|
|
c458ed8b0c | ||
|
|
7ec62401e7 | ||
|
|
be83c99334 | ||
|
|
7c8dbd370f | ||
|
|
604f37bd17 | ||
|
|
9d6ee0d08f | ||
|
|
7dc2e6cb5f | ||
|
|
fb5fd5a279 | ||
|
|
d3bf80342d | ||
|
|
77502efce7 | ||
|
|
ca34f7a78a | ||
|
|
eae8b8835b | ||
|
|
58c6b4edb1 | ||
|
|
86252a22a0 | ||
|
|
964a1716d7 | ||
|
|
06862240f0 | ||
|
|
3119510ef4 | ||
|
|
b4a8ed8828 | ||
|
|
c182664167 | ||
|
|
4bba24801c | ||
|
|
274e556989 | ||
|
|
74758818e7 | ||
|
|
69a191d4e2 | ||
|
|
f9d949f90c | ||
|
|
130d3e7b16 | ||
|
|
f6e519d779 | ||
|
|
ca807583df | ||
|
|
e6df2d5d40 | ||
|
|
82c1f29eba | ||
|
|
fc78a51235 | ||
|
|
28b3eb9585 | ||
|
|
e9e9214910 | ||
|
|
03a1f9b9b1 | ||
|
|
bee529b7fa | ||
|
|
6e9615261e | ||
|
|
1fad30a43a |
@@ -182,7 +182,7 @@ return array(
|
||||
'settinggroup' => 'admin',
|
||||
'varname' => 'show_news_feed',
|
||||
'type' => 'bool',
|
||||
'default' => true,
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'customer_show_news_feed' => array(
|
||||
@@ -190,7 +190,7 @@ return array(
|
||||
'settinggroup' => 'customer',
|
||||
'varname' => 'show_news_feed',
|
||||
'type' => 'bool',
|
||||
'default' => true,
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'customer_news_feed_url' => array(
|
||||
|
||||
@@ -183,11 +183,19 @@ return array(
|
||||
'varname' => 'allow_preset',
|
||||
),
|
||||
'onlyif' => 1
|
||||
)
|
||||
),
|
||||
)
|
||||
),
|
||||
'system_backupenabled' => array(
|
||||
'label' => $lng['serversettings']['backupenabled'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'backupenabled',
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'cronmodule' => 'froxlor/backup',
|
||||
'save_method' => 'storeSettingField'
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
)
|
||||
);
|
||||
|
||||
?>
|
||||
|
||||
@@ -80,6 +80,15 @@ return array(
|
||||
'default' => '',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_leenabled' => array(
|
||||
'label' => $lng['serversettings']['leenabled'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'leenabled',
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'cronmodule' => 'froxlor/letsencrypt',
|
||||
'save_method' => 'storeSettingField'
|
||||
),
|
||||
'system_letsencryptca' => array(
|
||||
'label' => $lng['serversettings']['letsencryptca'],
|
||||
'settinggroup' => 'system',
|
||||
|
||||
@@ -939,7 +939,9 @@ if ($page == 'customers'
|
||||
SELECT ip, port FROM `".TABLE_PANEL_IPSANDPORTS."`
|
||||
WHERE `id` = :defaultip
|
||||
");
|
||||
$srv_ip = Database::pexecute_first($srv_ip_stmt, array('defaultip' => reset(explode(',', Settings::Get('system.defaultip')))));
|
||||
$default_ips = Settings::Get('system.defaultip');
|
||||
$default_ips = explode(',', $default_ips);
|
||||
$srv_ip = Database::pexecute_first($srv_ip_stmt, array('defaultip' => reset($default_ips)));
|
||||
|
||||
$replace_arr = array(
|
||||
'FIRSTNAME' => $firstname,
|
||||
|
||||
1067
admin_domains.php
1067
admin_domains.php
File diff suppressed because it is too large
Load Diff
@@ -34,7 +34,8 @@ if ($page == 'log'
|
||||
$result_stmt = Database::query('
|
||||
SELECT * FROM `' . TABLE_PANEL_LOG . '` ' . $paging->getSqlWhere(false) . ' ' . $paging->getSqlOrderBy() . ' ' . $paging->getSqlLimit()
|
||||
);
|
||||
$paging->setEntries(Database::num_rows());
|
||||
$logs_count = Database::num_rows();
|
||||
$paging->setEntries($logs_count);
|
||||
$sortcode = $paging->getHtmlSortCode($lng);
|
||||
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
|
||||
$searchcode = $paging->getHtmlSearchCode($lng);
|
||||
@@ -105,6 +106,7 @@ if ($page == 'log'
|
||||
$count++;
|
||||
$_action = $action;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
@@ -62,7 +62,6 @@ if ($page == 'overview') {
|
||||
}
|
||||
}
|
||||
|
||||
$query .= " ORDER BY domain ASC";
|
||||
$domainresult_stmt = Database::prepare($query);
|
||||
Database::pexecute($domainresult_stmt, $query_params);
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ if ($page == 'overview' && $userinfo['change_serversettings'] == '1') {
|
||||
$settings_part = false;
|
||||
$only_enabledisable = true;
|
||||
}
|
||||
|
||||
|
||||
// check if the session timeout is too low #815
|
||||
if (isset($_POST['session_sessiontimeout'])
|
||||
&& $_POST['session_sessiontimeout'] < 60
|
||||
@@ -160,6 +160,8 @@ if ($page == 'overview' && $userinfo['change_serversettings'] == '1') {
|
||||
inserttask('10');
|
||||
// Using nameserver, insert a task which rebuilds the server config
|
||||
inserttask('4');
|
||||
// cron.d file
|
||||
inserttask('99');
|
||||
|
||||
standard_success('rebuildingconfigs', '', array('filename' => 'admin_index.php'));
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ if ($page == 'overview') {
|
||||
}
|
||||
}
|
||||
|
||||
if (hasUpdates($version)) {
|
||||
if (hasDbUpdates($dbversion) || hasUpdates($version)) {
|
||||
$successful_update = false;
|
||||
$message = '';
|
||||
|
||||
@@ -67,16 +67,16 @@ if ($page == 'overview') {
|
||||
|| !isset($_POST['update_preconfig'])
|
||||
) {
|
||||
eval("echo \"" . getTemplate('update/update_start') . "\";");
|
||||
|
||||
|
||||
include_once './install/updatesql.php';
|
||||
|
||||
|
||||
$redirect_url = 'admin_index.php?s=' . $s;
|
||||
eval("echo \"" . getTemplate('update/update_end') . "\";");
|
||||
|
||||
|
||||
updateCounters();
|
||||
inserttask('1');
|
||||
@chmod('./lib/userdata.inc.php', 0440);
|
||||
|
||||
|
||||
$successful_update = true;
|
||||
} else {
|
||||
$message = '<br /><strong class="red">You have to agree that you have read the update notifications.</strong>';
|
||||
@@ -85,15 +85,26 @@ if ($page == 'overview') {
|
||||
|
||||
if (!$successful_update) {
|
||||
$current_version = Settings::Get('panel.version');
|
||||
$current_db_version = Settings::Get('panel.db_version');
|
||||
if (empty($current_db_version)) {
|
||||
$current_db_version = "0";
|
||||
}
|
||||
$new_version = $version;
|
||||
$new_db_version = $dbversion;
|
||||
|
||||
$ui_text = $lng['update']['update_information']['part_a'];
|
||||
$ui_text = str_replace('%curversion', $current_version, $ui_text);
|
||||
$ui_text = str_replace('%newversion', $new_version, $ui_text);
|
||||
if ($version != $current_version) {
|
||||
$ui_text = str_replace('%curversion', $current_version, $ui_text);
|
||||
$ui_text = str_replace('%newversion', $new_version, $ui_text);
|
||||
} else {
|
||||
// show db version
|
||||
$ui_text = str_replace('%curversion', $current_db_version, $ui_text);
|
||||
$ui_text = str_replace('%newversion', $new_db_version, $ui_text);
|
||||
}
|
||||
$update_information = $ui_text;
|
||||
|
||||
include_once './install/updates/preconfig.php';
|
||||
$preconfig = getPreConfig($current_version);
|
||||
$preconfig = getPreConfig($current_version, $current_db_version);
|
||||
if ($preconfig != '') {
|
||||
$update_information .= '<br />' . $preconfig . $message;
|
||||
}
|
||||
|
||||
@@ -1,206 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2016 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 Panel
|
||||
*
|
||||
* @since 0.9.35
|
||||
*
|
||||
*/
|
||||
|
||||
define('AREA', 'admin');
|
||||
require './lib/init.php';
|
||||
|
||||
$id = 0;
|
||||
if (isset($_POST['id'])) {
|
||||
$id = intval($_POST['id']);
|
||||
} elseif (isset($_GET['id'])) {
|
||||
$id = intval($_GET['id']);
|
||||
}
|
||||
|
||||
if ($page == 'overview') {
|
||||
$supported_webservers = [ 'apache2' => 'Apache 2', 'lighttpd' => 'ligHTTPd', 'nginx' => 'Nginx' ];
|
||||
|
||||
if ($action == '') {
|
||||
$tablecontent = '';
|
||||
$count = 0;
|
||||
$result = Database::query("SELECT * FROM `" . TABLE_PANEL_VHOSTCONFIGS . "` ORDER BY description ASC");
|
||||
|
||||
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
|
||||
$query_params = array('id' => $row['id']);
|
||||
|
||||
$query = "SELECT * FROM `" . TABLE_PANEL_DOMAINS . "`
|
||||
WHERE `vhostsettingid` = :id
|
||||
AND `parentdomainid` = '0'";
|
||||
|
||||
if ((int)$userinfo['domains_see_all'] == 0) {
|
||||
$query .= " AND `adminid` = :adminid";
|
||||
$query_params['adminid'] = $userinfo['adminid'];
|
||||
}
|
||||
|
||||
if ((int)Settings::Get('panel.phpconfigs_hidestdsubdomain') == 1) {
|
||||
$ssdids_res = Database::query("
|
||||
SELECT DISTINCT `standardsubdomain` FROM `".TABLE_PANEL_CUSTOMERS."`
|
||||
WHERE `standardsubdomain` > 0 ORDER BY `standardsubdomain` ASC;"
|
||||
);
|
||||
$ssdids = array();
|
||||
while ($ssd = $ssdids_res->fetch(PDO::FETCH_ASSOC)) {
|
||||
$ssdids[] = $ssd['standardsubdomain'];
|
||||
}
|
||||
if (count($ssdids) > 0) {
|
||||
$query .= " AND `id` NOT IN (".implode(', ', $ssdids).")";
|
||||
}
|
||||
}
|
||||
|
||||
$query .= " ORDER BY domain ASC";
|
||||
$domainresult_stmt = Database::prepare($query);
|
||||
Database::pexecute($domainresult_stmt, $query_params);
|
||||
|
||||
$domains = '';
|
||||
if (Database::num_rows() > 0) {
|
||||
while ($row2 = $domainresult_stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||
$domains.= $row2['domain'] . '<br/>';
|
||||
}
|
||||
}
|
||||
|
||||
if ($domains == '') {
|
||||
$domains = $lng['admin']['phpsettings']['notused'];
|
||||
}
|
||||
|
||||
$webserver = str_replace(array_keys($supported_webservers), array_values($supported_webservers), $row['webserver']);
|
||||
|
||||
$count++;
|
||||
eval("\$tablecontent.=\"" . getTemplate("vhostconfig/overview_overview") . "\";");
|
||||
}
|
||||
|
||||
eval("echo \"" . getTemplate("vhostconfig/overview") . "\";");
|
||||
|
||||
} else if ($action == 'add') {
|
||||
|
||||
if ((int)$userinfo['change_serversettings'] != 1) {
|
||||
standard_error('nopermissionsorinvalidid');
|
||||
}
|
||||
|
||||
if (isset($_POST['send']) && $_POST['send'] == 'send') {
|
||||
$description = validate($_POST['description'], 'description');
|
||||
$vhostsettings = validate(trim(str_replace("\r\n", "\n", $_POST['vhostsettings'])), 'vhostsettings', '/^[^\0]*$/');
|
||||
$webserver = validate($_POST['webserver'], 'webserver', '/^(' . implode("|", array_keys($supported_webservers)) . ')$/');
|
||||
|
||||
if (strlen($description) == 0 || strlen($description) > 50) {
|
||||
standard_error('descriptioninvalid');
|
||||
}
|
||||
|
||||
$ins_stmt = Database::prepare("
|
||||
INSERT INTO `" . TABLE_PANEL_VHOSTCONFIGS . "` SET
|
||||
`description` = :description,
|
||||
`vhostsettings` = :vhostsettings,
|
||||
`webserver` = :webserver
|
||||
");
|
||||
$ins_data = array('description' => $description, 'vhostsettings' => $vhostsettings, 'webserver' => $webserver);
|
||||
Database::pexecute($ins_stmt, $ins_data);
|
||||
|
||||
inserttask('1');
|
||||
$log->logAction(ADM_ACTION, LOG_INFO, "vhost config setting with description '" . $description . "' has been created by '" . $userinfo['loginname'] . "'");
|
||||
redirectTo($filename, array('page' => $page, 's' => $s));
|
||||
|
||||
} else {
|
||||
$webserver_options = '';
|
||||
while (list($webserver, $webserver_friendlyName) = each($supported_webservers)) {
|
||||
$webserver_options .= makeoption($webserver_friendlyName, $webserver, Settings::Get('system.webserver'), true);
|
||||
}
|
||||
|
||||
$vhostconfig_add_data = include_once dirname(__FILE__).'/lib/formfields/admin/vhostconfig/formfield.vhostconfig_add.php';
|
||||
$vhostconfig_add_form = htmlform::genHTMLForm($vhostconfig_add_data);
|
||||
|
||||
$title = $vhostconfig_add_data['vhostconfig_add']['title'];
|
||||
$image = $vhostconfig_add_data['vhostconfig_add']['image'];
|
||||
|
||||
eval("echo \"" . getTemplate("vhostconfig/overview_add") . "\";");
|
||||
}
|
||||
} else if ($action == 'delete') {
|
||||
|
||||
$result_stmt = Database::prepare("
|
||||
SELECT * FROM `" . TABLE_PANEL_VHOSTCONFIGS . "` WHERE `id` = :id"
|
||||
);
|
||||
$result = Database::pexecute_first($result_stmt, array('id' => $id));
|
||||
|
||||
if ($result['id'] != 0 && $result['id'] == $id && (int)$userinfo['change_serversettings'] == 1) {
|
||||
if (isset($_POST['send']) && $_POST['send'] == 'send') {
|
||||
// Remove a reference to this template from all domains using it
|
||||
$upd_stmt = Database::prepare("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET
|
||||
`vhostsettingid` = 0 WHERE `vhostsettingid` = :id"
|
||||
);
|
||||
Database::pexecute($upd_stmt, array('id' => $id));
|
||||
|
||||
$del_stmt = Database::prepare("DELETE FROM `" . TABLE_PANEL_VHOSTCONFIGS . "` WHERE `id` = :id");
|
||||
Database::pexecute($del_stmt, array('id' => $id));
|
||||
|
||||
inserttask('1');
|
||||
$log->logAction(ADM_ACTION, LOG_INFO, "vhost config setting with id #" . (int)$id . " has been deleted by '" . $userinfo['loginname'] . "'");
|
||||
redirectTo($filename, array('page' => $page, 's' => $s));
|
||||
|
||||
} else {
|
||||
ask_yesno('vhostsetting_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $result['description']);
|
||||
}
|
||||
} else {
|
||||
standard_error('nopermissionsorinvalidid');
|
||||
}
|
||||
} else if ($action == 'edit') {
|
||||
|
||||
$result_stmt = Database::prepare("
|
||||
SELECT * FROM `" . TABLE_PANEL_VHOSTCONFIGS . "` WHERE `id` = :id"
|
||||
);
|
||||
$result = Database::pexecute_first($result_stmt, array('id' => $id));
|
||||
|
||||
if ($result['id'] != 0 && $result['id'] == $id && (int)$userinfo['change_serversettings'] == 1) {
|
||||
if (isset($_POST['send']) && $_POST['send'] == 'send') {
|
||||
$description = validate($_POST['description'], 'description');
|
||||
$vhostsettings = validate(trim(str_replace("\r\n", "\n", $_POST['vhostsettings'])), 'vhostsettings', '/^[^\0]*$/');
|
||||
$webserver = validate($_POST['webserver'], 'webserver', '/^(' . implode("|", array_keys($supported_webservers)) . ')$/');
|
||||
|
||||
if (strlen($description) == 0 || strlen($description) > 50) {
|
||||
standard_error('descriptioninvalid');
|
||||
}
|
||||
|
||||
$upd_stmt = Database::prepare("
|
||||
UPDATE `" . TABLE_PANEL_VHOSTCONFIGS . "` SET
|
||||
`description` = :description,
|
||||
`vhostsettings` = :vhostsettings,
|
||||
`webserver` = :webserver
|
||||
WHERE `id` = :id"
|
||||
);
|
||||
$upd_data = array('description' => $description, 'vhostsettings' => $vhostsettings, 'webserver' => $webserver, 'id' => $id);
|
||||
Database::pexecute($upd_stmt, $upd_data);
|
||||
|
||||
inserttask('1');
|
||||
$log->logAction(ADM_ACTION, LOG_INFO, "vhost setting with description '" . $description . "' has been changed by '" . $userinfo['loginname'] . "'");
|
||||
redirectTo($filename, array('page' => $page, 's' => $s));
|
||||
|
||||
} else {
|
||||
$webserver_options = '';
|
||||
while (list($webserver, $webserver_friendlyName) = each($supported_webservers)) {
|
||||
$webserver_options .= makeoption($webserver_friendlyName, $webserver, $result['webserver'], true);
|
||||
}
|
||||
|
||||
$vhostconfig_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/vhostconfig/formfield.vhostconfig_edit.php';
|
||||
$vhostconfig_edit_form = htmlform::genHTMLForm($vhostconfig_edit_data);
|
||||
|
||||
$title = $vhostconfig_edit_data['vhostconfig_edit']['title'];
|
||||
$image = $vhostconfig_edit_data['vhostconfig_edit']['image'];
|
||||
|
||||
eval("echo \"" . getTemplate("vhostconfig/overview_edit") . "\";");
|
||||
}
|
||||
} else {
|
||||
standard_error('nopermissionsorinvalidid');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -86,7 +86,7 @@ if ($page == 'overview') {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$row['termination_date'] = str_replace("0000-00-00", "", $row['termination_date']);
|
||||
if($row['termination_date'] != "") {
|
||||
$cdate = strtotime($row['termination_date'] . " 23:59:59");
|
||||
@@ -171,7 +171,7 @@ if ($page == 'overview') {
|
||||
|
||||
eval("echo \"" . getTemplate("domains/domainlist") . "\";");
|
||||
} elseif ($action == 'delete' && $id != 0) {
|
||||
$stmt = Database::prepare("SELECT `id`, `customerid`, `domain`, `documentroot`, `isemaildomain`, `parentdomainid` FROM `" . TABLE_PANEL_DOMAINS . "`
|
||||
$stmt = Database::prepare("SELECT `id`, `customerid`, `domain`, `documentroot`, `isemaildomain`, `parentdomainid`, `aliasdomain` FROM `" . TABLE_PANEL_DOMAINS . "`
|
||||
WHERE `customerid` = :customerid
|
||||
AND `id` = :id"
|
||||
);
|
||||
@@ -197,6 +197,8 @@ if ($page == 'overview') {
|
||||
}
|
||||
}
|
||||
|
||||
triggerLetsEncryptCSRForAliasDestinationDomain($result['aliasdomain'], $log);
|
||||
|
||||
$log->logAction(USR_ACTION, LOG_INFO, "deleted subdomain '" . $idna_convert->decode($result['domain']) . "'");
|
||||
$stmt = Database::prepare("DELETE FROM `" . TABLE_PANEL_DOMAINS . "` WHERE
|
||||
`customerid` = :customerid
|
||||
@@ -245,6 +247,11 @@ if ($page == 'overview') {
|
||||
} elseif ($action == 'add') {
|
||||
if ($userinfo['subdomains_used'] < $userinfo['subdomains'] || $userinfo['subdomains'] == '-1') {
|
||||
if (isset($_POST['send']) && $_POST['send'] == 'send') {
|
||||
|
||||
if (strpos($_POST['subdomain'], '--') !== false) {
|
||||
standard_error('domain_nopunycode');
|
||||
}
|
||||
|
||||
$subdomain = $idna_convert->encode(preg_replace(array('/\:(\d)+$/', '/^https?\:\/\//'), '', validate($_POST['subdomain'], 'subdomain', '', 'subdomainiswrong')));
|
||||
$domain = $idna_convert->encode($_POST['domain']);
|
||||
$domain_stmt = Database::prepare("SELECT * FROM `" . TABLE_PANEL_DOMAINS . "`
|
||||
@@ -290,6 +297,7 @@ if ($page == 'overview') {
|
||||
ORDER BY `d`.`domain` ASC;"
|
||||
);
|
||||
$aliasdomain_check = Database::pexecute_first($aliasdomain_stmt, array("id" => $aliasdomain, "customerid" => $userinfo['customerid']));
|
||||
triggerLetsEncryptCSRForAliasDestinationDomain($aliasdomain, $log);
|
||||
}
|
||||
|
||||
if (isset($_POST['url']) && $_POST['url'] != '' && validateUrl($idna_convert->encode($_POST['url']))) {
|
||||
@@ -342,11 +350,6 @@ if ($page == 'overview') {
|
||||
}
|
||||
}
|
||||
|
||||
if ($aliasdomain != 0 && $letsencrypt != 0)
|
||||
{
|
||||
standard_error('letsencryptdoesnotworkwithaliasdomains');
|
||||
}
|
||||
|
||||
// Temporarily deactivate ssl_redirect until Let's Encrypt certificate was generated
|
||||
if ($ssl_redirect > 0 && $letsencrypt == 1) {
|
||||
$ssl_redirect = 2;
|
||||
@@ -548,7 +551,7 @@ if ($page == 'overview') {
|
||||
|
||||
$aliasdomain = intval($_POST['alias']);
|
||||
|
||||
if (isset($_POST['selectserveralias']) && $result['parentdomainid'] == '0' ) {
|
||||
if (isset($_POST['selectserveralias'])) {
|
||||
$iswildcarddomain = ($_POST['selectserveralias'] == '0') ? '1' : '0';
|
||||
$wwwserveralias = ($_POST['selectserveralias'] == '1') ? '1' : '0';
|
||||
} else {
|
||||
@@ -610,9 +613,9 @@ if ($page == 'overview') {
|
||||
$letsencrypt = '0';
|
||||
}
|
||||
|
||||
if ($aliasdomain != 0 && $letsencrypt != 0)
|
||||
{
|
||||
standard_error('letsencryptdoesnotworkwithaliasdomains');
|
||||
// We can't enable let's encrypt for wildcard - domains
|
||||
if ($iswildcarddomain == '1' && $letsencrypt == '1') {
|
||||
standard_error('nowildcardwithletsencrypt');
|
||||
}
|
||||
|
||||
// Temporarily deactivate ssl_redirect until Let's Encrypt certificate was generated
|
||||
@@ -672,6 +675,17 @@ if ($page == 'overview') {
|
||||
"id" => $id
|
||||
);
|
||||
Database::pexecute($stmt, $params);
|
||||
|
||||
if ($result['aliasdomain'] != $aliasdomain) {
|
||||
// trigger when domain id for alias destination has changed: both for old and new destination
|
||||
triggerLetsEncryptCSRForAliasDestinationDomain($result['aliasdomain'], $log);
|
||||
triggerLetsEncryptCSRForAliasDestinationDomain($aliasdomain, $log);
|
||||
} else
|
||||
if ($result['wwwserveralias'] != $wwwserveralias || $result['letsencrypt'] != $letsencrypt) {
|
||||
// or when wwwserveralias or letsencrypt was changed
|
||||
triggerLetsEncryptCSRForAliasDestinationDomain($aliasdomain, $log);
|
||||
}
|
||||
|
||||
inserttask('1');
|
||||
|
||||
// Using nameserver, insert a task which rebuilds the server config
|
||||
|
||||
@@ -412,10 +412,11 @@ if ($page == 'overview') {
|
||||
standard_error('notallowedtouseaccounts');
|
||||
}
|
||||
|
||||
$stmt = Database::prepare("SELECT `id`, `email`, `email_full`, `iscatchall`, `destination`, `customerid`, `popaccountid`, `domainid` FROM `" . TABLE_MAIL_VIRTUAL . "`
|
||||
WHERE `customerid`= :cid
|
||||
AND `id`= :id"
|
||||
);
|
||||
$stmt = Database::prepare("
|
||||
SELECT `id`, `email`, `email_full`, `iscatchall`, `destination`, `customerid`, `popaccountid`, `domainid`
|
||||
FROM `" . TABLE_MAIL_VIRTUAL . "`
|
||||
WHERE `customerid`= :cid AND `id`= :id
|
||||
");
|
||||
$result = Database::pexecute_first($stmt, array("cid" => $userinfo['customerid'], "id" => $id));
|
||||
|
||||
if (isset($result['email']) && $result['email'] != '' && $result['popaccountid'] == '0') {
|
||||
@@ -595,7 +596,7 @@ if ($page == 'overview') {
|
||||
|
||||
if ($_mailerror) {
|
||||
$log->logAction(USR_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
|
||||
standard_error(array('errorsendingmail', $alternative_email));
|
||||
standard_error(array('errorsendingmail'), $alternative_email);
|
||||
}
|
||||
|
||||
$mail->ClearAddresses();
|
||||
@@ -604,6 +605,11 @@ if ($page == 'overview') {
|
||||
redirectTo($filename, array('page' => 'emails', 'action' => 'edit', 'id' => $id, 's' => $s));
|
||||
}
|
||||
} else {
|
||||
|
||||
if (checkMailAccDeletionState($result['email_full'])) {
|
||||
standard_error(array('mailaccistobedeleted'), $result['email_full']);
|
||||
}
|
||||
|
||||
$result['email_full'] = $idna_convert->decode($result['email_full']);
|
||||
$result = htmlentities_array($result);
|
||||
$quota = Settings::Get('system.mail_quota');
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* @package Panel
|
||||
*
|
||||
*/
|
||||
|
||||
define('AREA', 'customer');
|
||||
require './lib/init.php';
|
||||
|
||||
@@ -38,9 +37,10 @@ if ($page == 'overview') {
|
||||
);
|
||||
$paging = new paging($userinfo, TABLE_PANEL_HTPASSWDS, $fields);
|
||||
$result_stmt = Database::prepare("SELECT * FROM `" . TABLE_PANEL_HTPASSWDS . "`
|
||||
WHERE `customerid`= :customerid " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit()
|
||||
);
|
||||
Database::pexecute($result_stmt, array("customerid" => $userinfo['customerid']));
|
||||
WHERE `customerid`= :customerid " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
|
||||
Database::pexecute($result_stmt, array(
|
||||
"customerid" => $userinfo['customerid']
|
||||
));
|
||||
$paging->setEntries(Database::num_rows());
|
||||
$sortcode = $paging->getHtmlSortCode($lng);
|
||||
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
|
||||
@@ -53,43 +53,54 @@ if ($page == 'overview') {
|
||||
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||
if ($paging->checkDisplay($i)) {
|
||||
if (strpos($row['path'], $userinfo['documentroot']) === 0) {
|
||||
$row['path'] = str_replace($userinfo['documentroot'], "/", $row['path']);
|
||||
$row['path'] = str_replace($userinfo['documentroot'], "/", $row['path']);
|
||||
}
|
||||
|
||||
$row['path'] = makeCorrectDir($row['path']);
|
||||
$row = htmlentities_array($row);
|
||||
eval("\$htpasswds.=\"" . getTemplate("extras/htpasswds_htpasswd") . "\";");
|
||||
$count++;
|
||||
$count ++;
|
||||
}
|
||||
|
||||
$i++;
|
||||
$i ++;
|
||||
}
|
||||
|
||||
eval("echo \"" . getTemplate("extras/htpasswds") . "\";");
|
||||
} elseif ($action == 'delete' && $id != 0) {
|
||||
$result_stmt = Database::prepare("SELECT * FROM `" . TABLE_PANEL_HTPASSWDS . "`
|
||||
WHERE `customerid`= :customerid
|
||||
AND `id`= :id"
|
||||
);
|
||||
Database::pexecute($result_stmt, array("customerid" => $userinfo['customerid'], "id" => $id));
|
||||
AND `id`= :id");
|
||||
Database::pexecute($result_stmt, array(
|
||||
"customerid" => $userinfo['customerid'],
|
||||
"id" => $id
|
||||
));
|
||||
$result = $result_stmt->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
if (isset($result['username']) && $result['username'] != '') {
|
||||
if (isset($_POST['send']) && $_POST['send'] == 'send') {
|
||||
$stmt = Database::prepare("DELETE FROM `" . TABLE_PANEL_HTPASSWDS . "`
|
||||
WHERE `customerid`= :customerid
|
||||
AND `id`= :id"
|
||||
);
|
||||
Database::pexecute($stmt, array("customerid" => $userinfo['customerid'], "id" => $id));
|
||||
AND `id`= :id");
|
||||
Database::pexecute($stmt, array(
|
||||
"customerid" => $userinfo['customerid'],
|
||||
"id" => $id
|
||||
));
|
||||
|
||||
$log->logAction(USR_ACTION, LOG_INFO, "deleted htpasswd for '" . $result['username'] . " (" . $result['path'] . ")'");
|
||||
inserttask('1');
|
||||
redirectTo($filename, array('page' => $page, 's' => $s));
|
||||
redirectTo($filename, array(
|
||||
'page' => $page,
|
||||
's' => $s
|
||||
));
|
||||
} else {
|
||||
if (strpos($result['path'], $userinfo['documentroot']) === 0) {
|
||||
$result['path'] = str_replace($userinfo['documentroot'], "/", $result['path']);
|
||||
$result['path'] = str_replace($userinfo['documentroot'], "/", $result['path']);
|
||||
}
|
||||
|
||||
ask_yesno('extras_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $result['username'] . ' (' . $result['path'] . ')');
|
||||
ask_yesno('extras_reallydelete', $filename, array(
|
||||
'id' => $id,
|
||||
'page' => $page,
|
||||
'action' => $action
|
||||
), $result['username'] . ' (' . $result['path'] . ')');
|
||||
}
|
||||
}
|
||||
} elseif ($action == 'add') {
|
||||
@@ -104,8 +115,7 @@ if ($page == 'overview') {
|
||||
$username_path_check_stmt = Database::prepare("SELECT `id`, `username`, `path` FROM `" . TABLE_PANEL_HTPASSWDS . "`
|
||||
WHERE `username`= :username
|
||||
AND `path`= :path
|
||||
AND `customerid`= :customerid"
|
||||
);
|
||||
AND `customerid`= :customerid");
|
||||
$params = array(
|
||||
"username" => $username,
|
||||
"path" => $path,
|
||||
@@ -121,16 +131,22 @@ if ($page == 'overview') {
|
||||
$password = crypt($_POST['directory_password']);
|
||||
}
|
||||
|
||||
if (!$_POST['path']) {
|
||||
if (! $_POST['path']) {
|
||||
standard_error('invalidpath');
|
||||
}
|
||||
|
||||
if ($username == '') {
|
||||
standard_error(array('stringisempty', 'myloginname'));
|
||||
standard_error(array(
|
||||
'stringisempty',
|
||||
'myloginname'
|
||||
));
|
||||
} elseif ($username_path_check['username'] == $username && $username_path_check['path'] == $path) {
|
||||
standard_error('userpathcombinationdupe');
|
||||
} elseif ($_POST['directory_password'] == '') {
|
||||
standard_error(array('stringisempty', 'mypassword'));
|
||||
standard_error(array(
|
||||
'stringisempty',
|
||||
'mypassword'
|
||||
));
|
||||
} elseif ($path == '') {
|
||||
standard_error('patherror');
|
||||
} elseif ($_POST['directory_password'] == $username) {
|
||||
@@ -141,8 +157,7 @@ if ($page == 'overview') {
|
||||
`username` = :username,
|
||||
`password` = :password,
|
||||
`path` = :path,
|
||||
`authname` = :authname"
|
||||
);
|
||||
`authname` = :authname");
|
||||
$params = array(
|
||||
"customerid" => $userinfo['customerid'],
|
||||
"username" => $username,
|
||||
@@ -153,12 +168,15 @@ if ($page == 'overview') {
|
||||
Database::pexecute($stmt, $params);
|
||||
$log->logAction(USR_ACTION, LOG_INFO, "added htpasswd for '" . $username . " (" . $path . ")'");
|
||||
inserttask('1');
|
||||
redirectTo($filename, array('page' => $page, 's' => $s));
|
||||
redirectTo($filename, array(
|
||||
'page' => $page,
|
||||
's' => $s
|
||||
));
|
||||
}
|
||||
} else {
|
||||
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid']);
|
||||
|
||||
$htpasswd_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/extras/formfield.htpasswd_add.php';
|
||||
$htpasswd_add_data = include_once dirname(__FILE__) . '/lib/formfields/customer/extras/formfield.htpasswd_add.php';
|
||||
$htpasswd_add_form = htmlform::genHTMLForm($htpasswd_add_data);
|
||||
|
||||
$title = $htpasswd_add_data['htpasswd_add']['title'];
|
||||
@@ -169,9 +187,11 @@ if ($page == 'overview') {
|
||||
} elseif ($action == 'edit' && $id != 0) {
|
||||
$result_stmt = Database::prepare("SELECT * FROM `" . TABLE_PANEL_HTPASSWDS . "`
|
||||
WHERE `customerid`= :customerid
|
||||
AND `id`= :id"
|
||||
);
|
||||
Database::pexecute($result_stmt, array("customerid" => $userinfo['customerid'], "id" => $id));
|
||||
AND `id`= :id");
|
||||
Database::pexecute($result_stmt, array(
|
||||
"customerid" => $userinfo['customerid'],
|
||||
"id" => $id
|
||||
));
|
||||
$result = $result_stmt->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
if (isset($result['username']) && $result['username'] != '') {
|
||||
@@ -208,19 +228,21 @@ if ($page == 'overview') {
|
||||
}
|
||||
|
||||
if ($pwd_sql != '' || $auth_sql != '') {
|
||||
if ($pwd_sql !='' && $auth_sql != '') {
|
||||
$pwd_sql.= ', ';
|
||||
if ($pwd_sql != '' && $auth_sql != '') {
|
||||
$pwd_sql .= ', ';
|
||||
}
|
||||
|
||||
$stmt = Database::prepare("UPDATE `" . TABLE_PANEL_HTPASSWDS . "`
|
||||
SET ".$pwd_sql.$auth_sql."
|
||||
SET " . $pwd_sql . $auth_sql . "
|
||||
WHERE `customerid`= :customerid
|
||||
AND `id`= :id"
|
||||
);
|
||||
AND `id`= :id");
|
||||
Database::pexecute($stmt, $params);
|
||||
$log->logAction(USR_ACTION, LOG_INFO, "edited htpasswd for '" . $result['username'] . " (" . $result['path'] . ")'");
|
||||
inserttask('1');
|
||||
redirectTo($filename, array('page' => $page, 's' => $s));
|
||||
redirectTo($filename, array(
|
||||
'page' => $page,
|
||||
's' => $s
|
||||
));
|
||||
}
|
||||
} else {
|
||||
if (strpos($result['path'], $userinfo['documentroot']) === 0) {
|
||||
@@ -229,7 +251,7 @@ if ($page == 'overview') {
|
||||
|
||||
$result = htmlentities_array($result);
|
||||
|
||||
$htpasswd_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/extras/formfield.htpasswd_edit.php';
|
||||
$htpasswd_edit_data = include_once dirname(__FILE__) . '/lib/formfields/customer/extras/formfield.htpasswd_edit.php';
|
||||
$htpasswd_edit_form = htmlform::genHTMLForm($htpasswd_edit_data);
|
||||
|
||||
$title = $htpasswd_edit_data['htpasswd_edit']['title'];
|
||||
@@ -252,9 +274,10 @@ if ($page == 'overview') {
|
||||
);
|
||||
$paging = new paging($userinfo, TABLE_PANEL_HTACCESS, $fields);
|
||||
$result_stmt = Database::prepare("SELECT * FROM `" . TABLE_PANEL_HTACCESS . "`
|
||||
WHERE `customerid`= :customerid " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit()
|
||||
);
|
||||
Database::pexecute($result_stmt, array("customerid" => $userinfo['customerid']));
|
||||
WHERE `customerid`= :customerid " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
|
||||
Database::pexecute($result_stmt, array(
|
||||
"customerid" => $userinfo['customerid']
|
||||
));
|
||||
$paging->setEntries(Database::num_rows());
|
||||
$sortcode = $paging->getHtmlSortCode($lng);
|
||||
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
|
||||
@@ -271,56 +294,67 @@ if ($page == 'overview') {
|
||||
if (strpos($row['path'], $userinfo['documentroot']) === 0) {
|
||||
$row['path'] = str_replace($userinfo['documentroot'], "/", $row['path']);
|
||||
}
|
||||
|
||||
$row['path'] = makeCorrectDir($row['path']);
|
||||
$row['options_indexes'] = str_replace('1', $lng['panel']['yes'], $row['options_indexes']);
|
||||
$row['options_indexes'] = str_replace('0', $lng['panel']['no'], $row['options_indexes']);
|
||||
$row['options_cgi'] = str_replace('1', $lng['panel']['yes'], $row['options_cgi']);
|
||||
$row['options_cgi'] = str_replace('0', $lng['panel']['no'], $row['options_cgi']);
|
||||
$row = htmlentities_array($row);
|
||||
eval("\$htaccess.=\"" . getTemplate("extras/htaccess_htaccess") . "\";");
|
||||
$count++;
|
||||
$count ++;
|
||||
}
|
||||
|
||||
$i++;
|
||||
$i ++;
|
||||
}
|
||||
|
||||
eval("echo \"" . getTemplate("extras/htaccess") . "\";");
|
||||
} elseif ($action == 'delete' && $id != 0) {
|
||||
$result_stmt = Database::prepare("SELECT * FROM `" . TABLE_PANEL_HTACCESS . "`
|
||||
WHERE `customerid` = :customerid
|
||||
AND `id` = :id"
|
||||
);
|
||||
Database::pexecute($result_stmt, array("customerid" => $userinfo['customerid'], "id" => $id));
|
||||
AND `id` = :id");
|
||||
Database::pexecute($result_stmt, array(
|
||||
"customerid" => $userinfo['customerid'],
|
||||
"id" => $id
|
||||
));
|
||||
$result = $result_stmt->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
if (isset($result['customerid']) && $result['customerid'] != '' && $result['customerid'] == $userinfo['customerid']) {
|
||||
if (isset($_POST['send']) && $_POST['send'] == 'send') {
|
||||
// do we have to remove the symlink and folder in suexecpath?
|
||||
if ((int)Settings::Get('perl.suexecworkaround') == 1) {
|
||||
if ((int) Settings::Get('perl.suexecworkaround') == 1) {
|
||||
$loginname = getCustomerDetail($result['customerid'], 'loginname');
|
||||
$suexecpath = makeCorrectDir(Settings::Get('perl.suexecpath').'/'.$loginname.'/'.md5($result['path']).'/');
|
||||
$perlsymlink = makeCorrectFile($result['path'].'/cgi-bin');
|
||||
$suexecpath = makeCorrectDir(Settings::Get('perl.suexecpath') . '/' . $loginname . '/' . md5($result['path']) . '/');
|
||||
$perlsymlink = makeCorrectFile($result['path'] . '/cgi-bin');
|
||||
// remove symlink
|
||||
if (file_exists($perlsymlink)) {
|
||||
safe_exec('rm -f '.escapeshellarg($perlsymlink));
|
||||
safe_exec('rm -f ' . escapeshellarg($perlsymlink));
|
||||
$log->logAction(USR_ACTION, LOG_DEBUG, "deleted suexecworkaround symlink '" . $perlsymlink . "'");
|
||||
}
|
||||
// remove folder in suexec-path
|
||||
if (file_exists($suexecpath)) {
|
||||
safe_exec('rm -rf '.escapeshellarg($suexecpath));
|
||||
safe_exec('rm -rf ' . escapeshellarg($suexecpath));
|
||||
$log->logAction(USR_ACTION, LOG_DEBUG, "deleted suexecworkaround path '" . $suexecpath . "'");
|
||||
}
|
||||
}
|
||||
$stmt = Database::prepare("DELETE FROM `" . TABLE_PANEL_HTACCESS . "`
|
||||
WHERE `customerid`= :customerid
|
||||
AND `id`= :id"
|
||||
);
|
||||
Database::pexecute($stmt, array("customerid" => $userinfo['customerid'], "id" => $id));
|
||||
AND `id`= :id");
|
||||
Database::pexecute($stmt, array(
|
||||
"customerid" => $userinfo['customerid'],
|
||||
"id" => $id
|
||||
));
|
||||
$log->logAction(USR_ACTION, LOG_INFO, "deleted htaccess for '" . str_replace($userinfo['documentroot'], '/', $result['path']) . "'");
|
||||
inserttask('1');
|
||||
redirectTo($filename, array('page' => $page, 's' => $s));
|
||||
redirectTo($filename, array(
|
||||
'page' => $page,
|
||||
's' => $s
|
||||
));
|
||||
} else {
|
||||
ask_yesno('extras_reallydelete_pathoptions', $filename, array('id' => $id, 'page' => $page, 'action' => $action), str_replace($userinfo['documentroot'], '/', $result['path']));
|
||||
ask_yesno('extras_reallydelete_pathoptions', $filename, array(
|
||||
'id' => $id,
|
||||
'page' => $page,
|
||||
'action' => $action
|
||||
), str_replace($userinfo['documentroot'], '/', $result['path']));
|
||||
}
|
||||
}
|
||||
} elseif ($action == 'add') {
|
||||
@@ -330,16 +364,18 @@ if ($page == 'overview') {
|
||||
$path = makeCorrectDir($userinfo['documentroot'] . '/' . $path);
|
||||
$path_dupe_check_stmt = Database::prepare("SELECT `id`, `path` FROM `" . TABLE_PANEL_HTACCESS . "`
|
||||
WHERE `path`= :path
|
||||
AND `customerid`= :customerid"
|
||||
);
|
||||
Database::pexecute($path_dupe_check_stmt, array("path" => $path, "customerid" => $userinfo['customerid']));
|
||||
AND `customerid`= :customerid");
|
||||
Database::pexecute($path_dupe_check_stmt, array(
|
||||
"path" => $path,
|
||||
"customerid" => $userinfo['customerid']
|
||||
));
|
||||
$path_dupe_check = $path_dupe_check_stmt->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
if (!$_POST['path']) {
|
||||
if (! $_POST['path']) {
|
||||
standard_error('invalidpath');
|
||||
}
|
||||
|
||||
if (isset($_POST['options_cgi']) && (int)$_POST['options_cgi'] != 0) {
|
||||
if (isset($_POST['options_cgi']) && (int) $_POST['options_cgi'] != 0) {
|
||||
$options_cgi = '1';
|
||||
} else {
|
||||
$options_cgi = '0';
|
||||
@@ -372,8 +408,7 @@ if ($page == 'overview') {
|
||||
`error404path` = :error404path,
|
||||
`error403path` = :error403path,
|
||||
`error500path` = :error500path,
|
||||
`options_cgi` = :options_cgi'
|
||||
);
|
||||
`options_cgi` = :options_cgi');
|
||||
$params = array(
|
||||
"customerid" => $userinfo['customerid'],
|
||||
"path" => $path,
|
||||
@@ -387,13 +422,16 @@ if ($page == 'overview') {
|
||||
|
||||
$log->logAction(USR_ACTION, LOG_INFO, "added htaccess for '" . $path . "'");
|
||||
inserttask('1');
|
||||
redirectTo($filename, array('page' => $page, 's' => $s));
|
||||
redirectTo($filename, array(
|
||||
'page' => $page,
|
||||
's' => $s
|
||||
));
|
||||
}
|
||||
} else {
|
||||
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid']);
|
||||
$cperlenabled = customerHasPerlEnabled($userinfo['customerid']);
|
||||
|
||||
$htaccess_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/extras/formfield.htaccess_add.php';
|
||||
$htaccess_add_data = include_once dirname(__FILE__) . '/lib/formfields/customer/extras/formfield.htaccess_add.php';
|
||||
$htaccess_add_form = htmlform::genHTMLForm($htaccess_add_data);
|
||||
|
||||
$title = $htaccess_add_data['htaccess_add']['title'];
|
||||
@@ -404,9 +442,11 @@ if ($page == 'overview') {
|
||||
} elseif (($action == 'edit') && ($id != 0)) {
|
||||
$result_stmt = Database::prepare("SELECT * FROM `" . TABLE_PANEL_HTACCESS . "`
|
||||
WHERE `customerid` = :customerid
|
||||
AND `id` = :id"
|
||||
);
|
||||
Database::pexecute($result_stmt, array("customerid" => $userinfo['customerid'], "id" => $id));
|
||||
AND `id` = :id");
|
||||
Database::pexecute($result_stmt, array(
|
||||
"customerid" => $userinfo['customerid'],
|
||||
"id" => $id
|
||||
));
|
||||
$result = $result_stmt->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
if ((isset($result['customerid'])) && ($result['customerid'] != '') && ($result['customerid'] == $userinfo['customerid'])) {
|
||||
@@ -426,12 +466,7 @@ if ($page == 'overview') {
|
||||
$error403path = correctErrorDocument($_POST['error403path']);
|
||||
$error500path = correctErrorDocument($_POST['error500path']);
|
||||
|
||||
if (($option_indexes != $result['options_indexes'])
|
||||
|| ($error404path != $result['error404path'])
|
||||
|| ($error403path != $result['error403path'])
|
||||
|| ($error500path != $result['error500path'])
|
||||
|| ($options_cgi != $result['options_cgi'])
|
||||
) {
|
||||
if (($option_indexes != $result['options_indexes']) || ($error404path != $result['error404path']) || ($error403path != $result['error403path']) || ($error500path != $result['error500path']) || ($options_cgi != $result['options_cgi'])) {
|
||||
inserttask('1');
|
||||
$stmt = Database::prepare("UPDATE `" . TABLE_PANEL_HTACCESS . "`
|
||||
SET `options_indexes` = :options_indexes,
|
||||
@@ -440,8 +475,7 @@ if ($page == 'overview') {
|
||||
`error500path` = :error500path,
|
||||
`options_cgi` = :options_cgi
|
||||
WHERE `customerid` = :customerid
|
||||
AND `id` = :id"
|
||||
);
|
||||
AND `id` = :id");
|
||||
$params = array(
|
||||
"customerid" => $userinfo['customerid'],
|
||||
"options_indexes" => $_POST['options_indexes'] == '1' ? '1' : '0',
|
||||
@@ -455,7 +489,10 @@ if ($page == 'overview') {
|
||||
$log->logAction(USR_ACTION, LOG_INFO, "edited htaccess for '" . str_replace($userinfo['documentroot'], '/', $result['path']) . "'");
|
||||
}
|
||||
|
||||
redirectTo($filename, array('page' => $page, 's' => $s));
|
||||
redirectTo($filename, array(
|
||||
'page' => $page,
|
||||
's' => $s
|
||||
));
|
||||
} else {
|
||||
if (strpos($result['path'], $userinfo['documentroot']) === 0) {
|
||||
$result['path'] = str_replace($userinfo['documentroot'], "/", $result['path']);
|
||||
@@ -466,12 +503,12 @@ if ($page == 'overview') {
|
||||
$result['error500path'] = $result['error500path'];
|
||||
$cperlenabled = customerHasPerlEnabled($userinfo['customerid']);
|
||||
/*
|
||||
$options_indexes = makeyesno('options_indexes', '1', '0', $result['options_indexes']);
|
||||
$options_cgi = makeyesno('options_cgi', '1', '0', $result['options_cgi']);
|
||||
*/
|
||||
* $options_indexes = makeyesno('options_indexes', '1', '0', $result['options_indexes']);
|
||||
* $options_cgi = makeyesno('options_cgi', '1', '0', $result['options_cgi']);
|
||||
*/
|
||||
$result = htmlentities_array($result);
|
||||
|
||||
$htaccess_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/extras/formfield.htaccess_edit.php';
|
||||
$htaccess_edit_data = include_once dirname(__FILE__) . '/lib/formfields/customer/extras/formfield.htaccess_edit.php';
|
||||
$htaccess_edit_form = htmlform::genHTMLForm($htaccess_edit_data);
|
||||
|
||||
$title = $htaccess_edit_data['htaccess_edit']['title'];
|
||||
@@ -481,4 +518,76 @@ if ($page == 'overview') {
|
||||
}
|
||||
}
|
||||
}
|
||||
} elseif ($page == 'backup') {
|
||||
|
||||
if (Settings::Get('system.backupenabled') == 1)
|
||||
{
|
||||
if ($action == '') {
|
||||
$log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_extras::backup");
|
||||
|
||||
// check whether there is a backup-job for this customer
|
||||
$sel_stmt = Database::prepare("SELECT * FROM `".TABLE_PANEL_TASKS."` WHERE `type` = '20'");
|
||||
Database::pexecute($sel_stmt);
|
||||
while ($entry = $sel_stmt->fetch())
|
||||
{
|
||||
$data = unserialize($entry['data']);
|
||||
if ($data['customerid'] == $userinfo['customerid']) {
|
||||
standard_error('customerhasongoingbackupjob');
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($_POST['send']) && $_POST['send'] == 'send') {
|
||||
|
||||
if (! $_POST['path']) {
|
||||
standard_error('invalidpath');
|
||||
}
|
||||
|
||||
$path = makeCorrectDir(validate($_POST['path'], 'path'));
|
||||
$path = makeCorrectDir($userinfo['documentroot'] . '/' . $path);
|
||||
|
||||
$backup_dbs = isset($_POST['backup_dbs']) ? intval($_POST['backup_dbs']) : 0;
|
||||
$backup_mail = isset($_POST['backup_mail']) ? intval($_POST['backup_mail']) : 0;
|
||||
$backup_web = isset($_POST['backup_web']) ? intval($_POST['backup_web']) : 0;
|
||||
|
||||
if ($backup_dbs != '1') {
|
||||
$backup_dbs = '0';
|
||||
}
|
||||
|
||||
if ($backup_mail != '1') {
|
||||
$backup_mail = '0';
|
||||
}
|
||||
|
||||
if ($backup_web != '1') {
|
||||
$backup_web = '0';
|
||||
}
|
||||
|
||||
$task_data = array(
|
||||
'customerid' => $userinfo['customerid'],
|
||||
'uid' => $userinfo['guid'],
|
||||
'gid' => $userinfo['guid'],
|
||||
'loginname' => $userinfo['loginname'],
|
||||
'destdir' => $path,
|
||||
'backup_dbs' => $backup_dbs,
|
||||
'backup_mail' => $backup_mail,
|
||||
'backup_web' => $backup_web
|
||||
);
|
||||
// schedule backup job
|
||||
inserttask('20', $task_data);
|
||||
|
||||
standard_success('backupscheduled');
|
||||
} else {
|
||||
|
||||
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid']);
|
||||
$backup_data = include_once dirname(__FILE__) . '/lib/formfields/customer/extras/formfield.backup.php';
|
||||
$backup_form = htmlform::genHTMLForm($backup_data);
|
||||
$title = $backup_data['backup']['title'];
|
||||
$image = $backup_data['backup']['image'];
|
||||
eval("echo \"" . getTemplate("extras/backup") . "\";");
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
standard_error('backupfunctionnotenabled');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,8 @@ if ($page == 'log'
|
||||
SELECT * FROM `' . TABLE_PANEL_LOG . '` WHERE `user` = :loginname ' . $paging->getSqlWhere(true) . ' ' . $paging->getSqlOrderBy() . ' ' . $paging->getSqlLimit()
|
||||
);
|
||||
Database::pexecute($result_stmt, array("loginname" => $userinfo['loginname']));
|
||||
$paging->setEntries(Database::num_rows());
|
||||
$logs_count = Database::num_rows();
|
||||
$paging->setEntries($logs_count);
|
||||
$sortcode = $paging->getHtmlSortCode($lng);
|
||||
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
|
||||
$searchcode = $paging->getHtmlSearchCode($lng);
|
||||
@@ -105,6 +106,7 @@ if ($page == 'log'
|
||||
$count++;
|
||||
$_action = $action;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
@@ -69,13 +69,13 @@ if ($action == 'login') {
|
||||
}
|
||||
}
|
||||
|
||||
if (hasUpdates($version) && $is_admin == false) {
|
||||
if ((hasUpdates($version) || hasDbUpdates($dbversion)) && $is_admin == false) {
|
||||
redirectTo('index.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($is_admin) {
|
||||
if (hasUpdates($version)) {
|
||||
if (hasUpdates($version) || hasDbUpdates($dbversion)) {
|
||||
$stmt = Database::prepare("SELECT `loginname` AS `admin` FROM `" . TABLE_PANEL_ADMINS . "`
|
||||
WHERE `loginname`= :loginname
|
||||
AND `change_serversettings` = '1'"
|
||||
@@ -222,7 +222,7 @@ if ($action == 'login') {
|
||||
$qryparams['s'] = $s;
|
||||
|
||||
if ($userinfo['adminsession'] == '1') {
|
||||
if (hasUpdates($version)) {
|
||||
if (hasUpdates($version) || hasDbUpdates($dbversion)) {
|
||||
redirectTo('admin_updates.php', array('s' => $s));
|
||||
} else {
|
||||
if (isset($_POST['script']) && $_POST['script'] != "") {
|
||||
@@ -287,7 +287,7 @@ if ($action == 'login') {
|
||||
}
|
||||
|
||||
$update_in_progress = '';
|
||||
if (hasUpdates($version)) {
|
||||
if (hasUpdates($version) || hasDbUpdates($dbversion)) {
|
||||
$update_in_progress = $lng['update']['updateinprogress_onlyadmincanlogin'];
|
||||
}
|
||||
|
||||
|
||||
@@ -240,8 +240,6 @@ CREATE TABLE `panel_domains` (
|
||||
`openbasedir_path` tinyint(1) NOT NULL default '0',
|
||||
`speciallogfile` tinyint(1) NOT NULL default '0',
|
||||
`ssl_redirect` tinyint(4) NOT NULL default '0',
|
||||
`vhost_usedefaultlocation` tinyint(1) NOT NULL default '1',
|
||||
`vhostsettingid` tinyint(11) NOT NULL default '0',
|
||||
`specialsettings` text,
|
||||
`deactivated` tinyint(1) NOT NULL default '0',
|
||||
`bindserial` varchar(10) NOT NULL default '2000010100',
|
||||
@@ -374,7 +372,7 @@ INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES
|
||||
('dkim', 'dkim_domains', 'domains'),
|
||||
('dkim', 'dkim_dkimkeys', 'dkim-keys.conf'),
|
||||
('dkim', 'dkimrestart_command', '/etc/init.d/dkim-filter restart'),
|
||||
('admin', 'show_news_feed', '1'),
|
||||
('admin', 'show_news_feed', '0'),
|
||||
('admin', 'show_version_login', '0'),
|
||||
('admin', 'show_version_footer', '0'),
|
||||
('spf', 'use_spf', '0'),
|
||||
@@ -526,6 +524,8 @@ INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES
|
||||
('system', 'letsencryptchallengepath', '/var/www/froxlor'),
|
||||
('system', 'letsencryptkeysize', '4096'),
|
||||
('system', 'letsencryptreuseold', 0),
|
||||
('system', 'leenabled', '0'),
|
||||
('system', 'backupenabled', '0'),
|
||||
('panel', 'decimal_places', '4'),
|
||||
('panel', 'adminmail', 'admin@SERVERNAME'),
|
||||
('panel', 'phpmyadmin_url', ''),
|
||||
@@ -556,7 +556,8 @@ INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES
|
||||
('panel', 'password_numeric', '0'),
|
||||
('panel', 'password_special_char_required', '0'),
|
||||
('panel', 'password_special_char', '!?<>§$%+#=@'),
|
||||
('panel', 'version', '0.9.35-rc1');
|
||||
('panel', 'version', '0.9.36'),
|
||||
('panel', 'db_version', '201604270');
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS `panel_tasks`;
|
||||
@@ -741,8 +742,8 @@ CREATE TABLE `panel_phpconfigs` (
|
||||
|
||||
|
||||
INSERT INTO `panel_phpconfigs` (`id`, `description`, `binary`, `file_extensions`, `mod_fcgid_starter`, `mod_fcgid_maxrequests`, `phpsettings`) VALUES
|
||||
(1, 'Default Config', '/usr/bin/php-cgi', 'php', '-1', '-1', 'allow_call_time_pass_reference = Off\r\nallow_url_fopen = Off\r\nasp_tags = Off\r\ndisable_classes =\r\ndisable_functions = curl_exec,curl_multi_exec,exec,parse_ini_file,passthru,popen,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,show_source,system\r\ndisplay_errors = Off\r\ndisplay_startup_errors = Off\r\nenable_dl = Off\r\nerror_reporting = E_ALL & ~E_NOTICE\r\nexpose_php = Off\r\nfile_uploads = On\r\ncgi.force_redirect = 1\r\ngpc_order = "GPC"\r\nhtml_errors = Off\r\nignore_repeated_errors = Off\r\nignore_repeated_source = Off\r\ninclude_path = ".:{PEAR_DIR}"\r\nlog_errors = On\r\nlog_errors_max_len = 1024\r\nmagic_quotes_gpc = Off\r\nmagic_quotes_runtime = Off\r\nmagic_quotes_sybase = Off\r\nmax_execution_time = 30\r\nmax_input_time = 60\r\nmemory_limit = 128M\r\n{OPEN_BASEDIR_C}open_basedir = "{OPEN_BASEDIR}"\r\noutput_buffering = 4096\r\npost_max_size = 16M\r\nprecision = 14\r\nregister_argc_argv = Off\r\nregister_globals = Off\r\nreport_memleaks = On\r\nsendmail_path = "/usr/sbin/sendmail -t -i -f {CUSTOMER_EMAIL}"\r\nsession.auto_start = 0\r\nsession.bug_compat_42 = 0\r\nsession.bug_compat_warn = 1\r\nsession.cache_expire = 180\r\nsession.cache_limiter = nocache\r\nsession.cookie_domain =\r\nsession.cookie_lifetime = 0\r\nsession.cookie_path = /\r\nsession.entropy_file = /dev/urandom\r\nsession.entropy_length = 16\r\nsession.gc_divisor = 1000\r\nsession.gc_maxlifetime = 1440\r\nsession.gc_probability = 1\r\nsession.name = PHPSESSID\r\nsession.referer_check =\r\nsession.save_handler = files\r\nsession.save_path = "{TMP_DIR}"\r\nsession.serialize_handler = php\r\nsession.use_cookies = 1\r\nsession.use_trans_sid = 0\r\nshort_open_tag = On\r\nsuhosin.mail.protect = 1\r\nsuhosin.simulation = Off\r\ntrack_errors = Off\r\nupload_max_filesize = 32M\r\nupload_tmp_dir = "{TMP_DIR}"\r\nvariables_order = "GPCS"\r\n;mail.add_x_header = On\r\n;mail.log = "/var/log/phpmail.log"\r\n'),
|
||||
(2, 'Froxlor Vhost Config', '/usr/bin/php-cgi', 'php', '-1', '-1', 'allow_call_time_pass_reference = Off\r\nallow_url_fopen = On\r\nasp_tags = Off\r\ndisable_classes =\r\ndisable_functions = curl_multi_exec,exec,parse_ini_file,passthru,popen,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,show_source,system\r\ndisplay_errors = Off\r\ndisplay_startup_errors = Off\r\nenable_dl = Off\r\nerror_reporting = E_ALL & ~E_NOTICE\r\nexpose_php = Off\r\nfile_uploads = On\r\ncgi.force_redirect = 1\r\ngpc_order = "GPC"\r\nhtml_errors = Off\r\nignore_repeated_errors = Off\r\nignore_repeated_source = Off\r\ninclude_path = ".:{PEAR_DIR}"\r\nlog_errors = On\r\nlog_errors_max_len = 1024\r\nmagic_quotes_gpc = Off\r\nmagic_quotes_runtime = Off\r\nmagic_quotes_sybase = Off\r\nmax_execution_time = 60\r\nmax_input_time = 60\r\nmemory_limit = 128M\r\nnoutput_buffering = 4096\r\npost_max_size = 16M\r\nprecision = 14\r\nregister_argc_argv = Off\r\nregister_globals = Off\r\nreport_memleaks = On\r\nsendmail_path = "/usr/sbin/sendmail -t -i -f {CUSTOMER_EMAIL}"\r\nsession.auto_start = 0\r\nsession.bug_compat_42 = 0\r\nsession.bug_compat_warn = 1\r\nsession.cache_expire = 180\r\nsession.cache_limiter = nocache\r\nsession.cookie_domain =\r\nsession.cookie_lifetime = 0\r\nsession.cookie_path = /\r\nsession.entropy_file = /dev/urandom\r\nsession.entropy_length = 16\r\nsession.gc_divisor = 1000\r\nsession.gc_maxlifetime = 1440\r\nsession.gc_probability = 1\r\nsession.name = PHPSESSID\r\nsession.referer_check =\r\nsession.save_handler = files\r\nsession.save_path = "{TMP_DIR}"\r\nsession.serialize_handler = php\r\nsession.use_cookies = 1\r\nsession.use_trans_sid = 0\r\nshort_open_tag = On\r\nsuhosin.mail.protect = 1\r\nsuhosin.simulation = Off\r\ntrack_errors = Off\r\nupload_max_filesize = 32M\r\nupload_tmp_dir = "{TMP_DIR}"\r\nvariables_order = "GPCS"\r\n;mail.add_x_header = On\r\n;mail.log = "/var/log/phpmail.log"\r\n');
|
||||
(1, 'Default Config', '/usr/bin/php-cgi', 'php', '-1', '-1', 'allow_call_time_pass_reference = Off\r\nallow_url_fopen = Off\r\nasp_tags = Off\r\ndisable_classes =\r\ndisable_functions = curl_exec,curl_multi_exec,exec,parse_ini_file,passthru,popen,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,show_source,system\r\ndisplay_errors = Off\r\ndisplay_startup_errors = Off\r\nenable_dl = Off\r\nerror_reporting = E_ALL & ~E_NOTICE\r\nexpose_php = Off\r\nfile_uploads = On\r\ncgi.force_redirect = 1\r\ngpc_order = "GPC"\r\nhtml_errors = Off\r\nignore_repeated_errors = Off\r\nignore_repeated_source = Off\r\ninclude_path = ".:{PEAR_DIR}"\r\nlog_errors = On\r\nlog_errors_max_len = 1024\r\nmagic_quotes_gpc = Off\r\nmagic_quotes_runtime = Off\r\nmagic_quotes_sybase = Off\r\nmax_execution_time = 30\r\nmax_input_time = 60\r\nmemory_limit = 128M\r\n{OPEN_BASEDIR_C}open_basedir = "{OPEN_BASEDIR}"\r\noutput_buffering = 4096\r\npost_max_size = 16M\r\nprecision = 14\r\nregister_argc_argv = Off\r\nregister_globals = Off\r\nreport_memleaks = On\r\nsendmail_path = "/usr/sbin/sendmail -t -i -f {CUSTOMER_EMAIL}"\r\nsession.auto_start = 0\r\nsession.bug_compat_42 = 0\r\nsession.bug_compat_warn = 1\r\nsession.cache_expire = 180\r\nsession.cache_limiter = nocache\r\nsession.cookie_domain =\r\nsession.cookie_lifetime = 0\r\nsession.cookie_path = /\r\nsession.entropy_file = /dev/urandom\r\nsession.entropy_length = 16\r\nsession.gc_divisor = 1000\r\nsession.gc_maxlifetime = 1440\r\nsession.gc_probability = 1\r\nsession.name = PHPSESSID\r\nsession.referer_check =\r\nsession.save_handler = files\r\nsession.save_path = "{TMP_DIR}"\r\nsession.serialize_handler = php\r\nsession.use_cookies = 1\r\nsession.use_trans_sid = 0\r\nshort_open_tag = On\r\nsuhosin.mail.protect = 1\r\nsuhosin.simulation = Off\r\ntrack_errors = Off\r\nupload_max_filesize = 32M\r\nupload_tmp_dir = "{TMP_DIR}"\r\nvariables_order = "GPCS"\r\n;mail.add_x_header = On\r\n;mail.log = "/var/log/phpmail.log"\r\nopcache.restrict_api = "{DOCUMENT_ROOT}"\r\n'),
|
||||
(2, 'Froxlor Vhost Config', '/usr/bin/php-cgi', 'php', '-1', '-1', 'allow_call_time_pass_reference = Off\r\nallow_url_fopen = On\r\nasp_tags = Off\r\ndisable_classes =\r\ndisable_functions = curl_multi_exec,exec,parse_ini_file,passthru,popen,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,show_source,system\r\ndisplay_errors = Off\r\ndisplay_startup_errors = Off\r\nenable_dl = Off\r\nerror_reporting = E_ALL & ~E_NOTICE\r\nexpose_php = Off\r\nfile_uploads = On\r\ncgi.force_redirect = 1\r\ngpc_order = "GPC"\r\nhtml_errors = Off\r\nignore_repeated_errors = Off\r\nignore_repeated_source = Off\r\ninclude_path = ".:{PEAR_DIR}"\r\nlog_errors = On\r\nlog_errors_max_len = 1024\r\nmagic_quotes_gpc = Off\r\nmagic_quotes_runtime = Off\r\nmagic_quotes_sybase = Off\r\nmax_execution_time = 60\r\nmax_input_time = 60\r\nmemory_limit = 128M\r\nnoutput_buffering = 4096\r\npost_max_size = 16M\r\nprecision = 14\r\nregister_argc_argv = Off\r\nregister_globals = Off\r\nreport_memleaks = On\r\nsendmail_path = "/usr/sbin/sendmail -t -i -f {CUSTOMER_EMAIL}"\r\nsession.auto_start = 0\r\nsession.bug_compat_42 = 0\r\nsession.bug_compat_warn = 1\r\nsession.cache_expire = 180\r\nsession.cache_limiter = nocache\r\nsession.cookie_domain =\r\nsession.cookie_lifetime = 0\r\nsession.cookie_path = /\r\nsession.entropy_file = /dev/urandom\r\nsession.entropy_length = 16\r\nsession.gc_divisor = 1000\r\nsession.gc_maxlifetime = 1440\r\nsession.gc_probability = 1\r\nsession.name = PHPSESSID\r\nsession.referer_check =\r\nsession.save_handler = files\r\nsession.save_path = "{TMP_DIR}"\r\nsession.serialize_handler = php\r\nsession.use_cookies = 1\r\nsession.use_trans_sid = 0\r\nshort_open_tag = On\r\nsuhosin.mail.protect = 1\r\nsuhosin.simulation = Off\r\ntrack_errors = Off\r\nupload_max_filesize = 32M\r\nupload_tmp_dir = "{TMP_DIR}"\r\nvariables_order = "GPCS"\r\n;mail.add_x_header = On\r\n;mail.log = "/var/log/phpmail.log"\r\nopcache.restrict_api = ""\r\n');
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS `cronjobs_run`;
|
||||
@@ -765,7 +766,8 @@ INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `isactive`,
|
||||
(4, 'froxlor/ticket', 'ticketarchive', '1 MONTH', '1', 'cron_ticketarchive'),
|
||||
(5, 'froxlor/reports', 'usage_report', '1 DAY', '1', 'cron_usage_report'),
|
||||
(6, 'froxlor/core', 'mailboxsize', '6 HOUR', '1', 'cron_mailboxsize'),
|
||||
(7, 'froxlor/letsencrypt', 'letsencrypt', '5 MINUTE', '1', 'cron_letsencrypt');
|
||||
(7, 'froxlor/letsencrypt', 'letsencrypt', '5 MINUTE', '0', 'cron_letsencrypt'),
|
||||
(8, 'froxlor/backup', 'backup', '1 DAY', '1', 'cron_backup');
|
||||
|
||||
|
||||
|
||||
@@ -785,7 +787,7 @@ CREATE TABLE IF NOT EXISTS `ftp_quotalimits` (
|
||||
|
||||
|
||||
|
||||
INSERT INTO `ftp_quotalimits` (`name`, `quota_type`, `per_session`, `limit_type`, `bytes_in_avail`, `bytes_out_avail`, `bytes_xfer_avail`, `files_in_avail`, `files_out_avail`, `files_xfer_avail`) VALUES
|
||||
INSERT INTO `ftp_quotalimits` (`name`, `quota_type`, `per_session`, `limit_type`, `bytes_in_avail`, `bytes_out_avail`, `bytes_xfer_avail`, `files_in_avail`, `files_out_avail`, `files_xfer_avail`) VALUES
|
||||
('froxlor', 'user', 'false', 'hard', 0, 0, 0, 0, 0, 0);
|
||||
|
||||
|
||||
@@ -853,11 +855,3 @@ CREATE TABLE IF NOT EXISTS `panel_domaintoip` (
|
||||
PRIMARY KEY (`id_domain`,`id_ipandports`)
|
||||
) ENGINE=MyISAM CHARSET=utf8 COLLATE=utf8_general_ci;
|
||||
|
||||
DROP TABLE IF EXISTS `panel_vhostconfigs`;
|
||||
CREATE TABLE IF NOT EXISTS `panel_vhostconfigs` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`description` varchar(50) NOT NULL,
|
||||
`vhostsettings` text NOT NULL,
|
||||
`webserver` varchar(255) NOT NULL default '',
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -34,7 +34,6 @@ $lng['requirements']['phpbcmath'] = 'PHP bcmath-extension...';
|
||||
$lng['requirements']['phpcurl'] = 'PHP curl-extension...';
|
||||
$lng['requirements']['phpmbstring'] = 'PHP mbstring-extension...';
|
||||
$lng['requirements']['bcmathdescription'] = 'Traffic-calculation related functions will not work correctly!';
|
||||
$lng['requirements']['curldescription'] = 'Version-check and news-feed may not work correctly!';
|
||||
$lng['requirements']['openbasedir'] = 'open_basedir...';
|
||||
$lng['requirements']['openbasedirenabled'] = 'Froxlor will not work properly with open_basedir enabled. Please disable open_basedir for Froxlor in the coresponding php.ini';
|
||||
$lng['requirements']['diedbecauseofrequirements'] = 'Cannot install Froxlor without these requirements! Try to fix them and retry.';
|
||||
@@ -56,6 +55,7 @@ $lng['install']['admin_account'] = 'Administrator Account';
|
||||
$lng['install']['admin_user'] = 'Administrator Username';
|
||||
$lng['install']['admin_pass1'] = 'Administrator Password';
|
||||
$lng['install']['admin_pass2'] = 'Administrator-Password (confirm)';
|
||||
$lng['install']['activate_newsfeed'] = 'Enable the official newsfeed<br><small>(https://inside.froxlor.org/news/)</small>';
|
||||
$lng['install']['serversettings'] = 'Server settings';
|
||||
$lng['install']['servername'] = 'Server name (FQDN, no ip-address)';
|
||||
$lng['install']['serverip'] = 'Server IP';
|
||||
|
||||
@@ -34,7 +34,6 @@ $lng['requirements']['phpbcmath'] = 'extension PHP bcmath ...';
|
||||
$lng['requirements']['phpcurl'] = 'extension PHP curl...';
|
||||
$lng['requirements']['phpmbstring'] = 'extension PHP mbstring...';
|
||||
$lng['requirements']['bcmathdescription'] = 'Les fonctions de calcul de traffic ne fonctionneront pas correctement!';
|
||||
$lng['requirements']['curldescription'] = 'Les vérifications de version et les flux d\'information peuvent ne pas fonctionner correctement!';
|
||||
$lng['requirements']['openbasedir'] = 'open_basedir...';
|
||||
$lng['requirements']['openbasedirenabled'] = 'Froxlor ne fonctionnera pas correctement avec open_basedir activé. Merci de désactiver open_basedir pour Froxlor dans le php.ini correspondant';
|
||||
$lng['requirements']['diedbecauseofrequirements'] = 'Impossible d\'installer Froxlor sans ces prérequis! Essayez de les corriger et essayez à nouveau.';
|
||||
|
||||
@@ -34,7 +34,6 @@ $lng['requirements']['phpbcmath'] = 'PHP bcmath-Erweiterung...';
|
||||
$lng['requirements']['phpcurl'] = 'PHP curl-Erweiterung...';
|
||||
$lng['requirements']['phpmbstring'] = 'PHP mbstring-Erweiterung...';
|
||||
$lng['requirements']['bcmathdescription'] = 'Traffic-Berechnungs bezogene Funktionen stehen nicht vollständig zur Verfügung!';
|
||||
$lng['requirements']['curldescription'] = 'Versions-Prüfung und News-Feed stehen nicht vollständig zur Verfügung!';
|
||||
$lng['requirements']['openbasedir'] = 'open_basedir genutzt wird...';
|
||||
$lng['requirements']['openbasedirenabled'] = 'Froxlor wird mit aktiviertem open_basedir nicht vollständig funktionieren. Bitte deaktivieren Sie open_basedir für Froxlor in der entsprechenden php.ini';
|
||||
$lng['requirements']['diedbecauseofrequirements'] = 'Kann Froxlor ohne diese Voraussetzungen nicht installieren! Beheben Sie die angezeigten Probleme und versuchen Sie es erneut.';
|
||||
@@ -56,6 +55,7 @@ $lng['install']['admin_account'] = 'Admin-Zugang';
|
||||
$lng['install']['admin_user'] = 'Administrator-Benutzername';
|
||||
$lng['install']['admin_pass1'] = 'Administrator-Passwort';
|
||||
$lng['install']['admin_pass2'] = 'Administrator-Passwort (Bestätigung)';
|
||||
$lng['install']['activate_newsfeed'] = 'Aktiviere das offizielle Newsfeed<br><small>(https://inside.froxlor.org/news/)</small>';
|
||||
$lng['install']['serversettings'] = 'Servereinstellungen';
|
||||
$lng['install']['servername'] = 'Servername (FQDN, keine IP-Adresse)';
|
||||
$lng['install']['serverip'] = 'Server-IP';
|
||||
|
||||
4
install/templates/dataitemyesno.tpl
Normal file
4
install/templates/dataitemyesno.tpl
Normal file
@@ -0,0 +1,4 @@
|
||||
<p>
|
||||
<label for="{$fieldname}" class="install-block {$style}">{$fieldlabel}:</label>
|
||||
<input type="checkbox" name="{$fieldname}" id="{$fieldname}" value="1" {$checked} />
|
||||
</p>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -21,17 +21,18 @@
|
||||
* outputs various content before the update process
|
||||
* can be continued (askes for agreement whatever is being asked)
|
||||
*
|
||||
* @param string version
|
||||
* @param string $current_version
|
||||
* @param int $current_db_version
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function getPreConfig($current_version)
|
||||
function getPreConfig($current_version, $current_db_version)
|
||||
{
|
||||
$has_preconfig = false;
|
||||
$return = '<div class="preconfig"><h3 class="red">PLEASE NOTE - Important update notifications</h3>';
|
||||
|
||||
include_once makeCorrectFile(dirname(__FILE__).'/preconfig/0.9/preconfig_0.9.inc.php');
|
||||
parseAndOutputPreconfig($has_preconfig, $return, $current_version);
|
||||
parseAndOutputPreconfig($has_preconfig, $return, $current_version, $current_db_version);
|
||||
|
||||
$return .= '<br /><br />'.makecheckbox('update_changesagreed', '<strong>I have read the update notifications above and I am aware of the changes made to my system.</strong>', '1', true, '0', true);
|
||||
$return .= '</div>';
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version) {
|
||||
function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version, $current_db_version) {
|
||||
|
||||
global $lng;
|
||||
|
||||
@@ -700,4 +700,20 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version) {
|
||||
$question .= '<br>';
|
||||
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
|
||||
}
|
||||
|
||||
if (versionInUpdate($current_db_version, '201603070')) {
|
||||
$has_preconfig = true;
|
||||
$description = 'You can chose whether you want to enable or disable our Let\'s Encrypt implementation.<br />Please remember that you need to go through the webserver-configuration when enabled because this feature needs a special configuration.<br /><br />';
|
||||
$question = '<strong>Do you want to enable Let\'s Encrypt? (default: yes):</strong> ';
|
||||
$question.= makeyesno('enable_letsencrypt', '1', '0', '1').'<br />';
|
||||
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
|
||||
}
|
||||
|
||||
if (versionInUpdate($current_db_version, '201604270')) {
|
||||
$has_preconfig = true;
|
||||
$description = 'You can chose whether you want to enable or disable our backup function.<br /><br />';
|
||||
$question = '<strong>Do you want to enable Backup? (default: no):</strong> ';
|
||||
$question.= makeyesno('enable_backup', '1', '0', '0').'<br />';
|
||||
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ if ($action == "newsfeed") {
|
||||
if (isset($_GET['role']) && $_GET['role'] == "customer") {
|
||||
$feed = Settings::Get("customer.news_feed_url");
|
||||
} else {
|
||||
$feed = "http://inside.froxlor.org/news/";
|
||||
$feed = "https://inside.froxlor.org/news/";
|
||||
}
|
||||
|
||||
if (function_exists("simplexml_load_file") == false) {
|
||||
|
||||
@@ -393,7 +393,9 @@ class ConfigDaemon {
|
||||
$return = 0;
|
||||
switch ($attributes['mode']) {
|
||||
case "isfile": if (!is_file($order)) { $return = -1; }; break;
|
||||
case "notisfile": if (is_file($order)) { $return = -1; }; break;
|
||||
case "isdir": if (!is_dir($order)) { $return = -1; }; break;
|
||||
case "notisdir": if (is_dir($order)) { $return = -1; }; break;
|
||||
case "false": if ($order == true) { $return = -1; }; break;
|
||||
case "true": if ($order == false) { $return = -1; }; break;
|
||||
case "notempty": if ($order == "") { $return = -1; }; break;
|
||||
|
||||
@@ -153,15 +153,16 @@ class phpinterface_fcgid {
|
||||
$php_ini_variables = array(
|
||||
'SAFE_MODE' => 'Off', // keep this for compatibility, just in case
|
||||
'PEAR_DIR' => Settings::Get('system.mod_fcgid_peardir'),
|
||||
'OPEN_BASEDIR' => $openbasedir,
|
||||
'OPEN_BASEDIR_C' => $openbasedirc,
|
||||
'OPEN_BASEDIR_GLOBAL' => Settings::Get('system.hpappendopenbasedir'),
|
||||
'TMP_DIR' => $this->getTempDir(),
|
||||
'CUSTOMER_EMAIL' => $this->_domain['email'],
|
||||
'ADMIN_EMAIL' => $admin['email'],
|
||||
'DOMAIN' => $this->_domain['domain'],
|
||||
'CUSTOMER' => $this->_domain['loginname'],
|
||||
'ADMIN' => $admin['loginname']
|
||||
'ADMIN' => $admin['loginname'],
|
||||
'OPEN_BASEDIR' => $openbasedir,
|
||||
'OPEN_BASEDIR_C' => $openbasedirc,
|
||||
'OPEN_BASEDIR_GLOBAL' => Settings::Get('system.phpappendopenbasedir'),
|
||||
'DOCUMENT_ROOT' => makeCorrectDir($this->_domain['documentroot'])
|
||||
);
|
||||
|
||||
//insert a small header for the file
|
||||
|
||||
@@ -92,7 +92,7 @@ class phpinterface_fpm {
|
||||
'suhosin.cookie.cryptua',
|
||||
'suhosin.cookie.cryptdocroot',
|
||||
'suhosin.executor.disable_eval',
|
||||
'mbstring.func_overload'
|
||||
'mbstring.func_overload'
|
||||
),
|
||||
'php_admin_value' => array(
|
||||
'cgi.redirect_status_env',
|
||||
@@ -111,7 +111,9 @@ class phpinterface_fpm {
|
||||
'sendmail_path',
|
||||
'session.gc_divisor',
|
||||
'session.gc_probability',
|
||||
'variables_order'
|
||||
'variables_order',
|
||||
'opcache.log_verbosity_level',
|
||||
'opcache.restrict_api'
|
||||
),
|
||||
'php_admin_flag' => array(
|
||||
'allow_call_time_pass_reference',
|
||||
@@ -127,7 +129,15 @@ class phpinterface_fpm {
|
||||
'ignore_repeated_source',
|
||||
'log_errors',
|
||||
'register_argc_argv',
|
||||
'report_memleaks'
|
||||
'report_memleaks',
|
||||
'opcache.enable',
|
||||
'opcache.consistency_checks',
|
||||
'opcache.dups_fix',
|
||||
'opcache.load_comments',
|
||||
'opcache.revalidate_path',
|
||||
'opcache.save_comments',
|
||||
'opcache.use_cwd',
|
||||
'opcache.validate_timestamps'
|
||||
)
|
||||
);
|
||||
|
||||
@@ -267,7 +277,6 @@ class phpinterface_fpm {
|
||||
$fpm_config.= 'php_admin_value[upload_tmp_dir] = ' . makeCorrectDir(Settings::Get('phpfpm.tmpdir') . '/' . $this->_domain['loginname'] . '/') . "\n";
|
||||
|
||||
$admin = $this->_getAdminData($this->_domain['adminid']);
|
||||
|
||||
$php_ini_variables = array(
|
||||
'SAFE_MODE' => 'Off', // keep this for compatibility, just in case
|
||||
'PEAR_DIR' => Settings::Get('phpfpm.peardir'),
|
||||
@@ -278,7 +287,9 @@ class phpinterface_fpm {
|
||||
'CUSTOMER' => $this->_domain['loginname'],
|
||||
'ADMIN' => $admin['loginname'],
|
||||
'OPEN_BASEDIR' => $openbasedir,
|
||||
'OPEN_BASEDIR_C' => ''
|
||||
'OPEN_BASEDIR_C' => '',
|
||||
'OPEN_BASEDIR_GLOBAL' => Settings::Get('system.phpappendopenbasedir'),
|
||||
'DOCUMENT_ROOT' => makeCorrectDir($this->_domain['documentroot'])
|
||||
);
|
||||
|
||||
$phpini = replace_variables($phpconfig['phpsettings'], $php_ini_variables);
|
||||
|
||||
@@ -31,7 +31,7 @@ class PHPMailer
|
||||
* The PHPMailer Version number.
|
||||
* @var string
|
||||
*/
|
||||
public $Version = '5.2.14';
|
||||
public $Version = '5.2.15';
|
||||
|
||||
/**
|
||||
* Email priority.
|
||||
@@ -352,6 +352,7 @@ class PHPMailer
|
||||
/**
|
||||
* Whether to split multiple to addresses into multiple messages
|
||||
* or send them all in one message.
|
||||
* Only supported in `mail` and `sendmail` transports, not in SMTP.
|
||||
* @var boolean
|
||||
*/
|
||||
public $SingleTo = false;
|
||||
@@ -446,6 +447,15 @@ class PHPMailer
|
||||
*/
|
||||
public $XMailer = '';
|
||||
|
||||
/**
|
||||
* Which validator to use by default when validating email addresses.
|
||||
* May be a callable to inject your own validator, but there are several built-in validators.
|
||||
* @see PHPMailer::validateAddress()
|
||||
* @var string|callable
|
||||
* @static
|
||||
*/
|
||||
public static $validator = 'auto';
|
||||
|
||||
/**
|
||||
* An instance of the SMTP sender class.
|
||||
* @var SMTP
|
||||
@@ -634,9 +644,11 @@ class PHPMailer
|
||||
* Constructor.
|
||||
* @param boolean $exceptions Should we throw external exceptions?
|
||||
*/
|
||||
public function __construct($exceptions = false)
|
||||
public function __construct($exceptions = null)
|
||||
{
|
||||
$this->exceptions = (boolean)$exceptions;
|
||||
if ($exceptions !== null) {
|
||||
$this->exceptions = (boolean)$exceptions;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -645,9 +657,7 @@ class PHPMailer
|
||||
public function __destruct()
|
||||
{
|
||||
//Close any open SMTP connection nicely
|
||||
if ($this->Mailer == 'smtp') {
|
||||
$this->smtpClose();
|
||||
}
|
||||
$this->smtpClose();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -713,7 +723,7 @@ class PHPMailer
|
||||
case 'echo':
|
||||
default:
|
||||
//Normalize line breaks
|
||||
$str = preg_replace('/(\r\n|\r|\n)/ms', "\n", $str);
|
||||
$str = preg_replace('/\r\n?/ms', "\n", $str);
|
||||
echo gmdate('Y-m-d H:i:s') . "\t" . str_replace(
|
||||
"\n",
|
||||
"\n \t ",
|
||||
@@ -850,7 +860,7 @@ class PHPMailer
|
||||
$name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim
|
||||
if (($pos = strrpos($address, '@')) === false) {
|
||||
// At-sign is misssing.
|
||||
$error_message = $this->lang('invalid_address') . $address;
|
||||
$error_message = $this->lang('invalid_address') . " (addAnAddress $kind): $address";
|
||||
$this->setError($error_message);
|
||||
$this->edebug($error_message);
|
||||
if ($this->exceptions) {
|
||||
@@ -900,7 +910,7 @@ class PHPMailer
|
||||
return false;
|
||||
}
|
||||
if (!$this->validateAddress($address)) {
|
||||
$error_message = $this->lang('invalid_address') . $address;
|
||||
$error_message = $this->lang('invalid_address') . " (addAnAddress $kind): $address";
|
||||
$this->setError($error_message);
|
||||
$this->edebug($error_message);
|
||||
if ($this->exceptions) {
|
||||
@@ -994,7 +1004,7 @@ class PHPMailer
|
||||
if (($pos = strrpos($address, '@')) === false or
|
||||
(!$this->has8bitChars(substr($address, ++$pos)) or !$this->idnSupported()) and
|
||||
!$this->validateAddress($address)) {
|
||||
$error_message = $this->lang('invalid_address') . $address;
|
||||
$error_message = $this->lang('invalid_address') . " (setFrom) $address";
|
||||
$this->setError($error_message);
|
||||
$this->edebug($error_message);
|
||||
if ($this->exceptions) {
|
||||
@@ -1027,19 +1037,30 @@ class PHPMailer
|
||||
/**
|
||||
* Check that a string looks like an email address.
|
||||
* @param string $address The email address to check
|
||||
* @param string $patternselect A selector for the validation pattern to use :
|
||||
* @param string|callable $patternselect A selector for the validation pattern to use :
|
||||
* * `auto` Pick best pattern automatically;
|
||||
* * `pcre8` Use the squiloople.com pattern, requires PCRE > 8.0, PHP >= 5.3.2, 5.2.14;
|
||||
* * `pcre` Use old PCRE implementation;
|
||||
* * `php` Use PHP built-in FILTER_VALIDATE_EMAIL;
|
||||
* * `html5` Use the pattern given by the HTML5 spec for 'email' type form input elements.
|
||||
* * `noregex` Don't use a regex: super fast, really dumb.
|
||||
* Alternatively you may pass in a callable to inject your own validator, for example:
|
||||
* PHPMailer::validateAddress('user@example.com', function($address) {
|
||||
* return (strpos($address, '@') !== false);
|
||||
* });
|
||||
* You can also set the PHPMailer::$validator static to a callable, allowing built-in methods to use your validator.
|
||||
* @return boolean
|
||||
* @static
|
||||
* @access public
|
||||
*/
|
||||
public static function validateAddress($address, $patternselect = 'auto')
|
||||
public static function validateAddress($address, $patternselect = null)
|
||||
{
|
||||
if (is_null($patternselect)) {
|
||||
$patternselect = self::$validator;
|
||||
}
|
||||
if (is_callable($patternselect)) {
|
||||
return call_user_func($patternselect, $address);
|
||||
}
|
||||
//Reject line breaks in addresses; it's valid RFC5322, but not RFC5321
|
||||
if (strpos($address, "\n") !== false or strpos($address, "\r") !== false) {
|
||||
return false;
|
||||
@@ -1216,7 +1237,7 @@ class PHPMailer
|
||||
}
|
||||
$this->$address_kind = $this->punyencodeAddress($this->$address_kind);
|
||||
if (!$this->validateAddress($this->$address_kind)) {
|
||||
$error_message = $this->lang('invalid_address') . $this->$address_kind;
|
||||
$error_message = $this->lang('invalid_address') . ' (punyEncode) ' . $this->$address_kind;
|
||||
$this->setError($error_message);
|
||||
$this->edebug($error_message);
|
||||
if ($this->exceptions) {
|
||||
@@ -1227,7 +1248,7 @@ class PHPMailer
|
||||
}
|
||||
|
||||
// Set whether the message is multipart/alternative
|
||||
if (!empty($this->AltBody)) {
|
||||
if ($this->alternativeExists()) {
|
||||
$this->ContentType = 'multipart/alternative';
|
||||
}
|
||||
|
||||
@@ -1634,7 +1655,7 @@ class PHPMailer
|
||||
*/
|
||||
public function smtpClose()
|
||||
{
|
||||
if ($this->smtp !== null) {
|
||||
if (is_a($this->smtp, 'SMTP')) {
|
||||
if ($this->smtp->connected()) {
|
||||
$this->smtp->quit();
|
||||
$this->smtp->close();
|
||||
@@ -1972,7 +1993,7 @@ class PHPMailer
|
||||
$result .= $this->headerLine('Subject', $this->encodeHeader($this->secureHeader($this->Subject)));
|
||||
}
|
||||
|
||||
if ($this->MessageID != '') {
|
||||
if ('' != $this->MessageID and preg_match('/^<.*@.*>$/', $this->MessageID)) {
|
||||
$this->lastMessageID = $this->MessageID;
|
||||
} else {
|
||||
$this->lastMessageID = sprintf('<%s@%s>', $this->uniqueid, $this->serverHostname());
|
||||
@@ -2074,7 +2095,7 @@ class PHPMailer
|
||||
*/
|
||||
public function getSentMIMEMessage()
|
||||
{
|
||||
return $this->MIMEHeader . $this->mailHeader . self::CRLF . $this->MIMEBody;
|
||||
return rtrim($this->MIMEHeader . $this->mailHeader, "\n\r") . self::CRLF . self::CRLF . $this->MIMEBody;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2120,8 +2141,9 @@ class PHPMailer
|
||||
$altBodyEncoding = '7bit';
|
||||
$altBodyCharSet = 'us-ascii';
|
||||
}
|
||||
//If lines are too long, change to quoted-printable transfer encoding
|
||||
if (self::hasLineLongerThanMax($this->AltBody)) {
|
||||
//If lines are too long, and we're not already using an encoding that will shorten them,
|
||||
//change to quoted-printable transfer encoding
|
||||
if ('base64' != $altBodyEncoding and self::hasLineLongerThanMax($this->AltBody)) {
|
||||
$altBodyEncoding = 'quoted-printable';
|
||||
}
|
||||
//Use this as a preamble in all multipart message types
|
||||
@@ -3296,7 +3318,7 @@ class PHPMailer
|
||||
$message
|
||||
);
|
||||
}
|
||||
} elseif (substr($url, 0, 4) !== 'cid:' && !preg_match('#^[A-z]+://#', $url)) {
|
||||
} elseif (substr($url, 0, 4) !== 'cid:' && !preg_match('#^[a-z][a-z0-9+.-]*://#i', $url)) {
|
||||
// Do not change urls for absolute images (thanks to corvuscorax)
|
||||
// Do not change urls that are already inline images
|
||||
$filename = basename($url);
|
||||
@@ -3332,7 +3354,7 @@ class PHPMailer
|
||||
// Convert all message body line breaks to CRLF, makes quoted-printable encoding work much better
|
||||
$this->Body = $this->normalizeBreaks($message);
|
||||
$this->AltBody = $this->normalizeBreaks($this->html2text($message, $advanced));
|
||||
if (empty($this->AltBody)) {
|
||||
if (!$this->alternativeExists()) {
|
||||
$this->AltBody = 'To view this email message, open it in a program that understands HTML!' .
|
||||
self::CRLF . self::CRLF;
|
||||
}
|
||||
@@ -3657,11 +3679,13 @@ class PHPMailer
|
||||
if ($this->DKIM_passphrase != '') {
|
||||
$privKey = openssl_pkey_get_private($privKeyStr, $this->DKIM_passphrase);
|
||||
} else {
|
||||
$privKey = $privKeyStr;
|
||||
$privKey = openssl_pkey_get_private($privKeyStr);
|
||||
}
|
||||
if (openssl_sign($signHeader, $signature, $privKey)) {
|
||||
if (openssl_sign($signHeader, $signature, $privKey, 'sha256WithRSAEncryption')) { //sha1WithRSAEncryption
|
||||
openssl_pkey_free($privKey);
|
||||
return base64_encode($signature);
|
||||
}
|
||||
openssl_pkey_free($privKey);
|
||||
return '';
|
||||
}
|
||||
|
||||
@@ -3678,7 +3702,7 @@ class PHPMailer
|
||||
foreach ($lines as $key => $line) {
|
||||
list($heading, $value) = explode(':', $line, 2);
|
||||
$heading = strtolower($heading);
|
||||
$value = preg_replace('/\s+/', ' ', $value); // Compress useless spaces
|
||||
$value = preg_replace('/\s{2,}/', ' ', $value); // Compress useless spaces
|
||||
$lines[$key] = $heading . ':' . trim($value); // Don't forget to remove WSP around the value
|
||||
}
|
||||
$signHeader = implode("\r\n", $lines);
|
||||
@@ -3716,7 +3740,7 @@ class PHPMailer
|
||||
*/
|
||||
public function DKIM_Add($headers_line, $subject, $body)
|
||||
{
|
||||
$DKIMsignatureType = 'rsa-sha1'; // Signature & hash algorithms
|
||||
$DKIMsignatureType = 'rsa-sha256'; // Signature & hash algorithms
|
||||
$DKIMcanonicalization = 'relaxed/simple'; // Canonicalization of header/body
|
||||
$DKIMquery = 'dns/txt'; // Query method
|
||||
$DKIMtime = time(); // Signature Timestamp = seconds since 00:00:00 - Jan 1, 1970 (UTC time zone)
|
||||
@@ -3724,6 +3748,7 @@ class PHPMailer
|
||||
$headers = explode($this->LE, $headers_line);
|
||||
$from_header = '';
|
||||
$to_header = '';
|
||||
$date_header = '';
|
||||
$current = '';
|
||||
foreach ($headers as $header) {
|
||||
if (strpos($header, 'From:') === 0) {
|
||||
@@ -3732,6 +3757,9 @@ class PHPMailer
|
||||
} elseif (strpos($header, 'To:') === 0) {
|
||||
$to_header = $header;
|
||||
$current = 'to_header';
|
||||
} elseif (strpos($header, 'Date:') === 0) {
|
||||
$date_header = $header;
|
||||
$current = 'date_header';
|
||||
} else {
|
||||
if (!empty($$current) && strpos($header, ' =?') === 0) {
|
||||
$$current .= $header;
|
||||
@@ -3742,6 +3770,7 @@ class PHPMailer
|
||||
}
|
||||
$from = str_replace('|', '=7C', $this->DKIM_QP($from_header));
|
||||
$to = str_replace('|', '=7C', $this->DKIM_QP($to_header));
|
||||
$date = str_replace('|', '=7C', $this->DKIM_QP($date_header));
|
||||
$subject = str_replace(
|
||||
'|',
|
||||
'=7C',
|
||||
@@ -3749,7 +3778,7 @@ class PHPMailer
|
||||
); // Copied header fields (dkim-quoted-printable)
|
||||
$body = $this->DKIM_BodyC($body);
|
||||
$DKIMlen = strlen($body); // Length of body
|
||||
$DKIMb64 = base64_encode(pack('H*', sha1($body))); // Base64 of packed binary SHA-1 hash of body
|
||||
$DKIMb64 = base64_encode(pack('H*', hash('sha256', $body))); // Base64 of packed binary SHA-256 hash of body
|
||||
if ('' == $this->DKIM_identity) {
|
||||
$ident = '';
|
||||
} else {
|
||||
@@ -3762,16 +3791,18 @@ class PHPMailer
|
||||
$this->DKIM_selector .
|
||||
";\r\n" .
|
||||
"\tt=" . $DKIMtime . '; c=' . $DKIMcanonicalization . ";\r\n" .
|
||||
"\th=From:To:Subject;\r\n" .
|
||||
"\th=From:To:Date:Subject;\r\n" .
|
||||
"\td=" . $this->DKIM_domain . ';' . $ident . "\r\n" .
|
||||
"\tz=$from\r\n" .
|
||||
"\t|$to\r\n" .
|
||||
"\t|$date\r\n" .
|
||||
"\t|$subject;\r\n" .
|
||||
"\tbh=" . $DKIMb64 . ";\r\n" .
|
||||
"\tb=";
|
||||
$toSign = $this->DKIM_HeaderC(
|
||||
$from_header . "\r\n" .
|
||||
$to_header . "\r\n" .
|
||||
$date_header . "\r\n" .
|
||||
$subject_header . "\r\n" .
|
||||
$dkimhdrs
|
||||
);
|
||||
|
||||
@@ -30,7 +30,7 @@ class SMTP
|
||||
* The PHPMailer SMTP version number.
|
||||
* @var string
|
||||
*/
|
||||
const VERSION = '5.2.14';
|
||||
const VERSION = '5.2.15';
|
||||
|
||||
/**
|
||||
* SMTP line break constant.
|
||||
@@ -81,7 +81,7 @@ class SMTP
|
||||
* @deprecated Use the `VERSION` constant instead
|
||||
* @see SMTP::VERSION
|
||||
*/
|
||||
public $Version = '5.2.14';
|
||||
public $Version = '5.2.15';
|
||||
|
||||
/**
|
||||
* SMTP server port number.
|
||||
@@ -336,11 +336,22 @@ class SMTP
|
||||
if (!$this->sendCommand('STARTTLS', 'STARTTLS', 220)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
//Allow the best TLS version(s) we can
|
||||
$crypto_method = STREAM_CRYPTO_METHOD_TLS_CLIENT;
|
||||
|
||||
//PHP 5.6.7 dropped inclusion of TLS 1.1 and 1.2 in STREAM_CRYPTO_METHOD_TLS_CLIENT
|
||||
//so add them back in manually if we can
|
||||
if (defined('STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT')) {
|
||||
$crypto_method |= STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT;
|
||||
$crypto_method |= STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT;
|
||||
}
|
||||
|
||||
// Begin encrypted connection
|
||||
if (!stream_socket_enable_crypto(
|
||||
$this->smtp_conn,
|
||||
true,
|
||||
STREAM_CRYPTO_METHOD_TLS_CLIENT
|
||||
$crypto_method
|
||||
)) {
|
||||
return false;
|
||||
}
|
||||
@@ -736,7 +747,7 @@ class SMTP
|
||||
protected function parseHelloFields($type)
|
||||
{
|
||||
$this->server_caps = array();
|
||||
$lines = explode("\n", $this->last_reply);
|
||||
$lines = explode("\n", $this->helo_rply);
|
||||
|
||||
foreach ($lines as $n => $s) {
|
||||
//First 4 chars contain response code followed by - or space
|
||||
|
||||
@@ -184,6 +184,8 @@ class Settings {
|
||||
'value' => $value
|
||||
);
|
||||
Database::pexecute($ins_stmt, $ins_data);
|
||||
// also set new value to internal array and make it available
|
||||
self::$_data[$sstr[0]][$sstr[1]] = $value;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -4,14 +4,14 @@
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are met:
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// * Neither the name of the <organization> nor the
|
||||
// names of its contributors may be used to endorse or promote products
|
||||
// derived from this software without specific prior written permission.
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// * Neither the name of the <organization> nor the
|
||||
// names of its contributors may be used to endorse or promote products
|
||||
// derived from this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
@@ -28,261 +28,293 @@
|
||||
// and modified to work without files and integrate in Froxlor
|
||||
class lescript
|
||||
{
|
||||
public $license = 'https://letsencrypt.org/documents/LE-SA-v1.0.1-July-27-2015.pdf';
|
||||
|
||||
private $logger;
|
||||
private $client;
|
||||
private $accountKey;
|
||||
public $license = 'https://letsencrypt.org/documents/LE-SA-v1.0.1-July-27-2015.pdf';
|
||||
|
||||
public function __construct($logger)
|
||||
{
|
||||
$this->logger = $logger;
|
||||
if (Settings::Get('system.letsencryptca') == 'production') {
|
||||
$ca = 'https://acme-v01.api.letsencrypt.org';
|
||||
} else {
|
||||
$ca = 'https://acme-staging.api.letsencrypt.org';
|
||||
}
|
||||
$this->client = new Client($ca);
|
||||
$this->log("Using '$ca' to generate certificate");
|
||||
}
|
||||
private $logger;
|
||||
|
||||
public function initAccount($certrow)
|
||||
{
|
||||
// Let's see if we have the private accountkey
|
||||
$this->accountKey = $certrow['leprivatekey'];
|
||||
if (!$this->accountKey || $this->accountKey == 'unset') {
|
||||
private $client;
|
||||
|
||||
// generate and save new private key for account
|
||||
// ---------------------------------------------
|
||||
private $accountKey;
|
||||
|
||||
$this->log('Starting new account registration');
|
||||
$keys = $this->generateKey();
|
||||
// Only store the accountkey in production, in staging always generate a new key
|
||||
if (Settings::Get('system.letsencryptca') == 'production') {
|
||||
$upd_stmt = Database::prepare("
|
||||
UPDATE `".TABLE_PANEL_CUSTOMERS."` SET `lepublickey` = :public, `leprivatekey` = :private WHERE `customerid` = :customerid;
|
||||
");
|
||||
Database::pexecute($upd_stmt, array('public' => $keys['public'], 'private' => $keys['private'], 'customerid' => $certrow['customerid']));
|
||||
}
|
||||
$this->accountKey = $keys['private'];
|
||||
$this->postNewReg();
|
||||
$this->log('New account certificate registered');
|
||||
public function __construct($logger)
|
||||
{
|
||||
$this->logger = $logger;
|
||||
if (Settings::Get('system.letsencryptca') == 'production') {
|
||||
$ca = 'https://acme-v01.api.letsencrypt.org';
|
||||
} else {
|
||||
$ca = 'https://acme-staging.api.letsencrypt.org';
|
||||
}
|
||||
$this->client = new Client($ca);
|
||||
$this->log("Using '$ca' to generate certificate");
|
||||
}
|
||||
|
||||
} else {
|
||||
public function initAccount($certrow)
|
||||
{
|
||||
// Let's see if we have the private accountkey
|
||||
$this->accountKey = $certrow['leprivatekey'];
|
||||
if (! $this->accountKey || $this->accountKey == 'unset' || Settings::Get('system.letsencryptca') != 'production') {
|
||||
|
||||
$this->log('Account already registered. Continuing.');
|
||||
// generate and save new private key for account
|
||||
// ---------------------------------------------
|
||||
|
||||
}
|
||||
}
|
||||
$this->log('Starting new account registration');
|
||||
$keys = $this->generateKey();
|
||||
// Only store the accountkey in production, in staging always generate a new key
|
||||
if (Settings::Get('system.letsencryptca') == 'production') {
|
||||
$upd_stmt = Database::prepare(
|
||||
"UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `lepublickey` = :public, `leprivatekey` = :private " .
|
||||
"WHERE `customerid` = :customerid;");
|
||||
Database::pexecute($upd_stmt,
|
||||
array(
|
||||
'public' => $keys['public'],
|
||||
'private' => $keys['private'],
|
||||
'customerid' => $certrow['customerid']
|
||||
));
|
||||
}
|
||||
$this->accountKey = $keys['private'];
|
||||
|
||||
public function signDomains(array $domains, $domainkey = null, $csr = null)
|
||||
{
|
||||
$response = $this->postNewReg();
|
||||
if ($this->client->getLastCode() != 201) {
|
||||
throw new \RuntimeException("Account not initialized, probably due to rate limiting. Whole response: " . $response);
|
||||
}
|
||||
|
||||
if (!$this->accountKey) {
|
||||
throw new \RuntimeException("Account not initiated");
|
||||
}
|
||||
$this->postNewReg();
|
||||
$this->log('New account certificate registered');
|
||||
} else {
|
||||
|
||||
$this->log('Starting certificate generation process for domains');
|
||||
$this->log('Account already registered. Continuing.');
|
||||
}
|
||||
}
|
||||
|
||||
$privateAccountKey = openssl_pkey_get_private($this->accountKey);
|
||||
$accountKeyDetails = openssl_pkey_get_details($privateAccountKey);
|
||||
public function signDomains(array $domains, $domainkey = null, $csr = null)
|
||||
{
|
||||
if (! $this->accountKey) {
|
||||
throw new \RuntimeException("Account not initialized");
|
||||
}
|
||||
|
||||
// start domains authentication
|
||||
// ----------------------------
|
||||
$this->log('Starting certificate generation process for domains');
|
||||
|
||||
foreach($domains as $domain) {
|
||||
$privateAccountKey = openssl_pkey_get_private($this->accountKey);
|
||||
$accountKeyDetails = openssl_pkey_get_details($privateAccountKey);
|
||||
|
||||
// 1. getting available authentication options
|
||||
// -------------------------------------------
|
||||
// start domains authentication
|
||||
// ----------------------------
|
||||
|
||||
$this->log("Requesting challenge for $domain");
|
||||
foreach ($domains as $domain) {
|
||||
|
||||
$response = $this->signedRequest(
|
||||
"/acme/new-authz",
|
||||
array("resource" => "new-authz", "identifier" => array("type" => "dns", "value" => $domain))
|
||||
);
|
||||
// 1. getting available authentication options
|
||||
// -------------------------------------------
|
||||
|
||||
if (!array_key_exists('challenges', $response)) {
|
||||
throw new RuntimeException("No challenges received for $domain. Whole response: ".json_encode($response));
|
||||
}
|
||||
$this->log("Requesting challenge for $domain");
|
||||
|
||||
// choose http-01 challenge only
|
||||
$challenge = array_reduce($response['challenges'], function($v, $w) { return $v ? $v : ($w['type'] == 'http-01' ? $w : false); });
|
||||
if(!$challenge) throw new RuntimeException("HTTP Challenge for $domain is not available. Whole response: ".json_encode($response));
|
||||
$response = $this->signedRequest("/acme/new-authz",
|
||||
array(
|
||||
"resource" => "new-authz",
|
||||
"identifier" => array(
|
||||
"type" => "dns",
|
||||
"value" => $domain
|
||||
)
|
||||
));
|
||||
|
||||
$this->log("Got challenge token for $domain");
|
||||
$location = $this->client->getLastLocation();
|
||||
// if response is not an array but a string, it's most likely a server-error, e.g.
|
||||
// <HTML><HEAD><TITLE>Error</TITLE></HEAD><BODY>An error occurred while processing your request.
|
||||
// <p>Reference #179.d8be1402.1458059103.3613c4db</BODY></HTML>
|
||||
if (! is_array($response)) {
|
||||
throw new RuntimeException("Invalid response from LE for domain $domain. Whole response: " . $response);
|
||||
}
|
||||
|
||||
if (! array_key_exists('challenges', $response)) {
|
||||
throw new RuntimeException("No challenges received for $domain. Whole response: " . json_encode($response));
|
||||
}
|
||||
|
||||
// 2. saving authentication token for web verification
|
||||
// ---------------------------------------------------
|
||||
// choose http-01 challenge only
|
||||
$challenge = array_reduce($response['challenges'],
|
||||
function ($v, $w) {
|
||||
return $v ? $v : ($w['type'] == 'http-01' ? $w : false);
|
||||
});
|
||||
if (! $challenge)
|
||||
throw new RuntimeException("HTTP Challenge for $domain is not available. Whole response: " . json_encode($response));
|
||||
|
||||
$directory = Settings::Get('system.letsencryptchallengepath').'/.well-known/acme-challenge';
|
||||
$tokenPath = $directory.'/'.$challenge['token'];
|
||||
$this->log("Got challenge token for $domain");
|
||||
$location = $this->client->getLastLocation();
|
||||
|
||||
if(!file_exists($directory) && !@mkdir($directory, 0755, true)) {
|
||||
throw new \RuntimeException("Couldn't create directory to expose challenge: ${tokenPath}");
|
||||
}
|
||||
// 2. saving authentication token for web verification
|
||||
// ---------------------------------------------------
|
||||
|
||||
$header = array(
|
||||
// need to be in precise order!
|
||||
"e" => Base64UrlSafeEncoder::encode($accountKeyDetails["rsa"]["e"]),
|
||||
"kty" => "RSA",
|
||||
"n" => Base64UrlSafeEncoder::encode($accountKeyDetails["rsa"]["n"])
|
||||
$directory = Settings::Get('system.letsencryptchallengepath') . '/.well-known/acme-challenge';
|
||||
$tokenPath = $directory . '/' . $challenge['token'];
|
||||
|
||||
);
|
||||
$payload = $challenge['token'] . '.' . Base64UrlSafeEncoder::encode(hash('sha256', json_encode($header), true));
|
||||
if (! file_exists($directory) && ! @mkdir($directory, 0755, true)) {
|
||||
throw new \RuntimeException("Couldn't create directory to expose challenge: ${tokenPath}");
|
||||
}
|
||||
|
||||
file_put_contents($tokenPath, $payload);
|
||||
chmod($tokenPath, 0644);
|
||||
$header = array(
|
||||
// need to be in precise order!
|
||||
"e" => Base64UrlSafeEncoder::encode($accountKeyDetails["rsa"]["e"]),
|
||||
"kty" => "RSA",
|
||||
"n" => Base64UrlSafeEncoder::encode($accountKeyDetails["rsa"]["n"])
|
||||
);
|
||||
$payload = $challenge['token'] . '.' . Base64UrlSafeEncoder::encode(hash('sha256', json_encode($header), true));
|
||||
|
||||
// 3. verification process itself
|
||||
// -------------------------------
|
||||
file_put_contents($tokenPath, $payload);
|
||||
chmod($tokenPath, 0644);
|
||||
|
||||
$uri = "http://${domain}/.well-known/acme-challenge/${challenge['token']}";
|
||||
// 3. verification process itself
|
||||
// -------------------------------
|
||||
|
||||
$this->log("Token for $domain saved at $tokenPath and should be available at $uri");
|
||||
$uri = "http://${domain}/.well-known/acme-challenge/${challenge['token']}";
|
||||
|
||||
// simple self check
|
||||
if($payload !== trim(@file_get_contents($uri))) {
|
||||
@unlink($tokenPath);
|
||||
throw new \RuntimeException("Please check $uri - token not available");
|
||||
}
|
||||
$this->log("Token for $domain saved at $tokenPath and should be available at $uri");
|
||||
|
||||
$this->log("Sending request to challenge");
|
||||
// simple self check
|
||||
if ($payload !== trim(@file_get_contents($uri))) {
|
||||
$errmsg = json_encode(error_get_last());
|
||||
if ($errmsg != "null") {
|
||||
$errmsg = "; PHP error: " . $errmsg;
|
||||
} else {
|
||||
$errmsg = "";
|
||||
}
|
||||
@unlink($tokenPath);
|
||||
throw new \RuntimeException("Please check $uri - token not available" . $errmsg);
|
||||
}
|
||||
|
||||
// send request to challenge
|
||||
$result = $this->signedRequest(
|
||||
$challenge['uri'],
|
||||
array(
|
||||
"resource" => "challenge",
|
||||
"type" => "http-01",
|
||||
"keyAuthorization" => $payload,
|
||||
"token" => $challenge['token']
|
||||
)
|
||||
);
|
||||
$this->log("Sending request to challenge");
|
||||
|
||||
// waiting loop
|
||||
// we wait for a maximum of 30 seconds to avoid endless loops
|
||||
$count = 0;
|
||||
do {
|
||||
if(empty($result['status']) || $result['status'] == "invalid") {
|
||||
@unlink($tokenPath);
|
||||
throw new \RuntimeException("Verification ended with error: ".json_encode($result));
|
||||
}
|
||||
$ended = !($result['status'] === "pending");
|
||||
// send request to challenge
|
||||
$result = $this->signedRequest($challenge['uri'],
|
||||
array(
|
||||
"resource" => "challenge",
|
||||
"type" => "http-01",
|
||||
"keyAuthorization" => $payload,
|
||||
"token" => $challenge['token']
|
||||
));
|
||||
|
||||
if(!$ended) {
|
||||
$this->log("Verification pending, sleeping 1s");
|
||||
sleep(1);
|
||||
$count++;
|
||||
}
|
||||
// waiting loop
|
||||
// we wait for a maximum of 30 seconds to avoid endless loops
|
||||
$count = 0;
|
||||
do {
|
||||
if (empty($result['status']) || $result['status'] == "invalid") {
|
||||
@unlink($tokenPath);
|
||||
throw new \RuntimeException("Verification ended with error: " . json_encode($result));
|
||||
}
|
||||
$ended = ! ($result['status'] === "pending");
|
||||
|
||||
$result = $this->client->get($location);
|
||||
if (! $ended) {
|
||||
$this->log("Verification pending, sleeping 1s");
|
||||
sleep(1);
|
||||
$count ++;
|
||||
}
|
||||
|
||||
} while (!$ended && $count < 30);
|
||||
$result = $this->client->get($location);
|
||||
} while (! $ended && $count < 30);
|
||||
|
||||
$this->log("Verification ended with status: ${result['status']}");
|
||||
@unlink($tokenPath);
|
||||
}
|
||||
$this->log("Verification ended with status: ${result['status']}");
|
||||
@unlink($tokenPath);
|
||||
}
|
||||
|
||||
// requesting certificate
|
||||
// ----------------------
|
||||
// requesting certificate
|
||||
// ----------------------
|
||||
|
||||
// generate private key for domain if not exist
|
||||
if(empty($domainkey) || Settings::Get('system.letsencryptreuseold') == 0) {
|
||||
$keys = $this->generateKey();
|
||||
$domainkey = $keys['private'];
|
||||
}
|
||||
// generate private key for domain if not exist
|
||||
if (empty($domainkey) || Settings::Get('system.letsencryptreuseold') == 0) {
|
||||
$keys = $this->generateKey();
|
||||
$domainkey = $keys['private'];
|
||||
}
|
||||
|
||||
// load domain key
|
||||
$privateDomainKey = openssl_pkey_get_private($domainkey);
|
||||
// load domain key
|
||||
$privateDomainKey = openssl_pkey_get_private($domainkey);
|
||||
|
||||
$this->client->getLastLinks();
|
||||
|
||||
if (empty($csrfile) || Settings::Get('system.letsencryptreuseold') == 0) {
|
||||
$csr = $this->generateCSR($privateDomainKey, $domains);
|
||||
}
|
||||
$this->client->getLastLinks();
|
||||
|
||||
// request certificates creation
|
||||
$result = $this->signedRequest(
|
||||
"/acme/new-cert",
|
||||
array('resource' => 'new-cert', 'csr' => $csr)
|
||||
);
|
||||
if ($this->client->getLastCode() !== 201) {
|
||||
throw new \RuntimeException("Invalid response code: ".$this->client->getLastCode().", ".json_encode($result));
|
||||
}
|
||||
$location = $this->client->getLastLocation();
|
||||
$csr = $this->generateCSR($privateDomainKey, $domains);
|
||||
|
||||
// waiting loop
|
||||
$certificates = array();
|
||||
while(1) {
|
||||
$this->client->getLastLinks();
|
||||
// request certificates creation
|
||||
$result = $this->signedRequest("/acme/new-cert", array(
|
||||
'resource' => 'new-cert',
|
||||
'csr' => $csr
|
||||
));
|
||||
if ($this->client->getLastCode() !== 201) {
|
||||
throw new \RuntimeException("Invalid response code: " . $this->client->getLastCode() . ", " . json_encode($result));
|
||||
}
|
||||
$location = $this->client->getLastLocation();
|
||||
|
||||
$result = $this->client->get($location);
|
||||
// waiting loop
|
||||
$certificates = array();
|
||||
while (1) {
|
||||
$this->client->getLastLinks();
|
||||
|
||||
if($this->client->getLastCode() == 202) {
|
||||
$result = $this->client->get($location);
|
||||
|
||||
$this->log("Certificate generation pending, sleeping 1s");
|
||||
sleep(1);
|
||||
if ($this->client->getLastCode() == 202) {
|
||||
|
||||
} else if ($this->client->getLastCode() == 200) {
|
||||
$this->log("Certificate generation pending, sleeping 1s");
|
||||
sleep(1);
|
||||
} else
|
||||
if ($this->client->getLastCode() == 200) {
|
||||
|
||||
$this->log("Got certificate! YAY!");
|
||||
$certificates[] = $this->parsePemFromBody($result);
|
||||
$this->log("Got certificate! YAY!");
|
||||
$certificates[] = $this->parsePemFromBody($result);
|
||||
|
||||
foreach ($this->client->getLastLinks() as $link) {
|
||||
$this->log("Requesting chained cert at $link");
|
||||
$result = $this->client->get($link);
|
||||
$certificates[] = $this->parsePemFromBody($result);
|
||||
}
|
||||
|
||||
foreach($this->client->getLastLinks() as $link) {
|
||||
$this->log("Requesting chained cert at $link");
|
||||
$result = $this->client->get($link);
|
||||
$certificates[] = $this->parsePemFromBody($result);
|
||||
}
|
||||
break;
|
||||
} else {
|
||||
|
||||
break;
|
||||
} else {
|
||||
throw new \RuntimeException("Can't get certificate: HTTP code " . $this->client->getLastCode());
|
||||
}
|
||||
}
|
||||
|
||||
throw new \RuntimeException("Can't get certificate: HTTP code ".$this->client->getLastCode());
|
||||
if (empty($certificates))
|
||||
throw new \RuntimeException('No certificates generated');
|
||||
|
||||
}
|
||||
}
|
||||
$fullchain = implode("\n", $certificates);
|
||||
$crt = array_shift($certificates);
|
||||
$chain = implode("\n", $certificates);
|
||||
|
||||
if(empty($certificates)) throw new \RuntimeException('No certificates generated');
|
||||
$this->log("Done, returning new certificates and key");
|
||||
return array(
|
||||
'fullchain' => $fullchain,
|
||||
'crt' => $crt,
|
||||
'chain' => $chain,
|
||||
'key' => $domainkey,
|
||||
'csr' => $csr
|
||||
);
|
||||
}
|
||||
|
||||
$fullchain = implode("\n", $certificates);
|
||||
$crt = array_shift($certificates);
|
||||
$chain = implode("\n", $certificates);
|
||||
private function parsePemFromBody($body)
|
||||
{
|
||||
$pem = chunk_split(base64_encode($body), 64, "\n");
|
||||
return "-----BEGIN CERTIFICATE-----\n" . $pem . "-----END CERTIFICATE-----\n";
|
||||
}
|
||||
|
||||
$this->log("Done, returning new certificates and key");
|
||||
return array('fullchain' => $fullchain, 'crt' => $crt, 'chain' => $chain, 'key' => $domainkey, 'csr' => $csr);
|
||||
}
|
||||
private function postNewReg()
|
||||
{
|
||||
$this->log('Sending registration to letsencrypt server');
|
||||
|
||||
private function parsePemFromBody($body)
|
||||
{
|
||||
$pem = chunk_split(base64_encode($body), 64, "\n");
|
||||
return "-----BEGIN CERTIFICATE-----\n" . $pem . "-----END CERTIFICATE-----\n";
|
||||
}
|
||||
return $this->signedRequest('/acme/new-reg', array(
|
||||
'resource' => 'new-reg',
|
||||
'agreement' => $this->license
|
||||
));
|
||||
}
|
||||
|
||||
private function postNewReg()
|
||||
{
|
||||
$this->log('Sending registration to letsencrypt server');
|
||||
private function generateCSR($privateKey, array $domains)
|
||||
{
|
||||
$domain = reset($domains);
|
||||
$san = implode(",", array_map(function ($dns) {
|
||||
return "DNS:" . $dns;
|
||||
}, $domains));
|
||||
$tmpConf = tmpfile();
|
||||
$tmpConfMeta = stream_get_meta_data($tmpConf);
|
||||
$tmpConfPath = $tmpConfMeta["uri"];
|
||||
|
||||
return $this->signedRequest(
|
||||
'/acme/new-reg',
|
||||
array('resource' => 'new-reg', 'agreement' => $this->license)
|
||||
);
|
||||
}
|
||||
|
||||
private function generateCSR($privateKey, array $domains)
|
||||
{
|
||||
$domain = reset($domains);
|
||||
$san = implode(",", array_map(function ($dns) { return "DNS:" . $dns; }, $domains));
|
||||
$tmpConf = tmpfile();
|
||||
$tmpConfMeta = stream_get_meta_data($tmpConf);
|
||||
$tmpConfPath = $tmpConfMeta["uri"];
|
||||
|
||||
// workaround to get SAN working
|
||||
fwrite($tmpConf,
|
||||
'HOME = .
|
||||
// workaround to get SAN working
|
||||
fwrite($tmpConf,
|
||||
'HOME = .
|
||||
RANDFILE = $ENV::HOME/.rnd
|
||||
[ req ]
|
||||
default_bits = ' . Settings::Get('system.letsencryptkeysize') . '
|
||||
@@ -293,197 +325,204 @@ req_extensions = v3_req
|
||||
countryName = Country Name (2 letter code)
|
||||
[ v3_req ]
|
||||
basicConstraints = CA:FALSE
|
||||
subjectAltName = '.$san.'
|
||||
subjectAltName = ' . $san . '
|
||||
keyUsage = nonRepudiation, digitalSignature, keyEncipherment');
|
||||
|
||||
$csr = openssl_csr_new(
|
||||
array(
|
||||
"CN" => $domain,
|
||||
"ST" => Settings::Get('system.letsencryptstate'),
|
||||
"C" => Settings::Get('system.letsencryptcountrycode'),
|
||||
"O" => "Unknown",
|
||||
),
|
||||
$privateKey,
|
||||
array(
|
||||
"config" => $tmpConfPath,
|
||||
"digest_alg" => "sha256"
|
||||
)
|
||||
);
|
||||
$csr = openssl_csr_new(
|
||||
array(
|
||||
"CN" => $domain,
|
||||
"ST" => Settings::Get('system.letsencryptstate'),
|
||||
"C" => Settings::Get('system.letsencryptcountrycode'),
|
||||
"O" => "Unknown"
|
||||
), $privateKey, array(
|
||||
"config" => $tmpConfPath,
|
||||
"digest_alg" => "sha256"
|
||||
));
|
||||
|
||||
if (!$csr) throw new \RuntimeException("CSR couldn't be generated! ".openssl_error_string());
|
||||
if (! $csr)
|
||||
throw new \RuntimeException("CSR couldn't be generated! " . openssl_error_string());
|
||||
|
||||
openssl_csr_export($csr, $csr);
|
||||
fclose($tmpConf);
|
||||
openssl_csr_export($csr, $csr);
|
||||
fclose($tmpConf);
|
||||
|
||||
preg_match('~REQUEST-----(.*)-----END~s', $csr, $matches);
|
||||
preg_match('~REQUEST-----(.*)-----END~s', $csr, $matches);
|
||||
|
||||
return trim(Base64UrlSafeEncoder::encode(base64_decode($matches[1])));
|
||||
}
|
||||
return trim(Base64UrlSafeEncoder::encode(base64_decode($matches[1])));
|
||||
}
|
||||
|
||||
private function generateKey()
|
||||
{
|
||||
$res = openssl_pkey_new(array(
|
||||
"private_key_type" => OPENSSL_KEYTYPE_RSA,
|
||||
"private_key_bits" => (int)Settings::Get('system.letsencryptkeysize'),
|
||||
));
|
||||
private function generateKey()
|
||||
{
|
||||
$res = openssl_pkey_new(
|
||||
array(
|
||||
"private_key_type" => OPENSSL_KEYTYPE_RSA,
|
||||
"private_key_bits" => (int) Settings::Get('system.letsencryptkeysize')
|
||||
));
|
||||
|
||||
if(!openssl_pkey_export($res, $privateKey)) {
|
||||
throw new \RuntimeException("Key export failed!");
|
||||
}
|
||||
if (! openssl_pkey_export($res, $privateKey)) {
|
||||
throw new \RuntimeException("Key export failed!");
|
||||
}
|
||||
|
||||
$details = openssl_pkey_get_details($res);
|
||||
$details = openssl_pkey_get_details($res);
|
||||
|
||||
return array('private' => $privateKey, 'public' => $details['key']);
|
||||
}
|
||||
return array(
|
||||
'private' => $privateKey,
|
||||
'public' => $details['key']
|
||||
);
|
||||
}
|
||||
|
||||
private function signedRequest($uri, array $payload)
|
||||
{
|
||||
$privateKey = openssl_pkey_get_private($this->accountKey);
|
||||
$details = openssl_pkey_get_details($privateKey);
|
||||
private function signedRequest($uri, array $payload)
|
||||
{
|
||||
$privateKey = openssl_pkey_get_private($this->accountKey);
|
||||
$details = openssl_pkey_get_details($privateKey);
|
||||
|
||||
$header = array(
|
||||
"alg" => "RS256",
|
||||
"jwk" => array(
|
||||
"kty" => "RSA",
|
||||
"n" => Base64UrlSafeEncoder::encode($details["rsa"]["n"]),
|
||||
"e" => Base64UrlSafeEncoder::encode($details["rsa"]["e"]),
|
||||
)
|
||||
);
|
||||
$header = array(
|
||||
"alg" => "RS256",
|
||||
"jwk" => array(
|
||||
"kty" => "RSA",
|
||||
"n" => Base64UrlSafeEncoder::encode($details["rsa"]["n"]),
|
||||
"e" => Base64UrlSafeEncoder::encode($details["rsa"]["e"])
|
||||
)
|
||||
);
|
||||
|
||||
$protected = $header;
|
||||
$protected["nonce"] = $this->client->getLastNonce();
|
||||
$protected = $header;
|
||||
$protected["nonce"] = $this->client->getLastNonce();
|
||||
|
||||
$payload64 = Base64UrlSafeEncoder::encode(str_replace('\\/', '/', json_encode($payload)));
|
||||
$protected64 = Base64UrlSafeEncoder::encode(json_encode($protected));
|
||||
|
||||
$payload64 = Base64UrlSafeEncoder::encode(str_replace('\\/', '/', json_encode($payload)));
|
||||
$protected64 = Base64UrlSafeEncoder::encode(json_encode($protected));
|
||||
openssl_sign($protected64 . '.' . $payload64, $signed, $privateKey, "SHA256");
|
||||
|
||||
openssl_sign($protected64.'.'.$payload64, $signed, $privateKey, "SHA256");
|
||||
$signed64 = Base64UrlSafeEncoder::encode($signed);
|
||||
|
||||
$signed64 = Base64UrlSafeEncoder::encode($signed);
|
||||
$data = array(
|
||||
'header' => $header,
|
||||
'protected' => $protected64,
|
||||
'payload' => $payload64,
|
||||
'signature' => $signed64
|
||||
);
|
||||
|
||||
$data = array(
|
||||
'header' => $header,
|
||||
'protected' => $protected64,
|
||||
'payload' => $payload64,
|
||||
'signature' => $signed64
|
||||
);
|
||||
$this->log("Sending signed request to $uri");
|
||||
|
||||
$this->log("Sending signed request to $uri");
|
||||
return $this->client->post($uri, json_encode($data));
|
||||
}
|
||||
|
||||
return $this->client->post($uri, json_encode($data));
|
||||
}
|
||||
|
||||
protected function log($message)
|
||||
{
|
||||
$this->logger->logAction(CRON_ACTION, LOG_INFO, "letsencrypt " . $message);
|
||||
}
|
||||
protected function log($message)
|
||||
{
|
||||
$this->logger->logAction(CRON_ACTION, LOG_INFO, "letsencrypt " . $message);
|
||||
}
|
||||
}
|
||||
|
||||
class Client
|
||||
{
|
||||
private $lastCode;
|
||||
private $lastHeader;
|
||||
|
||||
private $base;
|
||||
private $lastCode;
|
||||
|
||||
public function __construct($base)
|
||||
{
|
||||
$this->base = $base;
|
||||
}
|
||||
private $lastHeader;
|
||||
|
||||
private function curl($method, $url, $data = null)
|
||||
{
|
||||
$headers = array('Accept: application/json', 'Content-Type: application/json');
|
||||
$handle = curl_init();
|
||||
curl_setopt($handle, CURLOPT_URL, preg_match('~^http~', $url) ? $url : $this->base.$url);
|
||||
curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);
|
||||
curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($handle, CURLOPT_HEADER, true);
|
||||
private $base;
|
||||
|
||||
// DO NOT DO THAT!
|
||||
// curl_setopt($handle, CURLOPT_SSL_VERIFYHOST, false);
|
||||
// curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false);
|
||||
public function __construct($base)
|
||||
{
|
||||
$this->base = $base;
|
||||
}
|
||||
|
||||
switch ($method) {
|
||||
case 'GET':
|
||||
break;
|
||||
case 'POST':
|
||||
curl_setopt($handle, CURLOPT_POST, true);
|
||||
curl_setopt($handle, CURLOPT_POSTFIELDS, $data);
|
||||
break;
|
||||
}
|
||||
$response = curl_exec($handle);
|
||||
private function curl($method, $url, $data = null)
|
||||
{
|
||||
$headers = array(
|
||||
'Accept: application/json',
|
||||
'Content-Type: application/json'
|
||||
);
|
||||
$handle = curl_init();
|
||||
curl_setopt($handle, CURLOPT_URL, preg_match('~^http~', $url) ? $url : $this->base . $url);
|
||||
curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);
|
||||
curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($handle, CURLOPT_HEADER, true);
|
||||
|
||||
if(curl_errno($handle)) {
|
||||
throw new \RuntimeException('Curl: '.curl_error($handle));
|
||||
}
|
||||
// DO NOT DO THAT!
|
||||
// curl_setopt($handle, CURLOPT_SSL_VERIFYHOST, false);
|
||||
// curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false);
|
||||
|
||||
$header_size = curl_getinfo($handle, CURLINFO_HEADER_SIZE);
|
||||
switch ($method) {
|
||||
case 'GET':
|
||||
break;
|
||||
case 'POST':
|
||||
curl_setopt($handle, CURLOPT_POST, true);
|
||||
curl_setopt($handle, CURLOPT_POSTFIELDS, $data);
|
||||
break;
|
||||
}
|
||||
$response = curl_exec($handle);
|
||||
|
||||
$header = substr($response, 0, $header_size);
|
||||
$body = substr($response, $header_size);
|
||||
if (curl_errno($handle)) {
|
||||
throw new \RuntimeException('Curl: ' . curl_error($handle));
|
||||
}
|
||||
|
||||
$this->lastHeader = $header;
|
||||
$this->lastCode = curl_getinfo($handle, CURLINFO_HTTP_CODE);
|
||||
$header_size = curl_getinfo($handle, CURLINFO_HEADER_SIZE);
|
||||
|
||||
$data = json_decode($body, true);
|
||||
return $data === null ? $body : $data;
|
||||
}
|
||||
$header = substr($response, 0, $header_size);
|
||||
$body = substr($response, $header_size);
|
||||
|
||||
public function post($url, $data)
|
||||
{
|
||||
return $this->curl('POST', $url, $data);
|
||||
}
|
||||
$this->lastHeader = $header;
|
||||
$this->lastCode = curl_getinfo($handle, CURLINFO_HTTP_CODE);
|
||||
|
||||
public function get($url)
|
||||
{
|
||||
return $this->curl('GET', $url);
|
||||
}
|
||||
$data = json_decode($body, true);
|
||||
return $data === null ? $body : $data;
|
||||
}
|
||||
|
||||
public function getLastNonce()
|
||||
{
|
||||
if(preg_match('~Replay\-Nonce: (.+)~i', $this->lastHeader, $matches)) {
|
||||
return trim($matches[1]);
|
||||
}
|
||||
public function post($url, $data)
|
||||
{
|
||||
return $this->curl('POST', $url, $data);
|
||||
}
|
||||
|
||||
$this->curl('GET', '/directory');
|
||||
return $this->getLastNonce();
|
||||
}
|
||||
public function get($url)
|
||||
{
|
||||
return $this->curl('GET', $url);
|
||||
}
|
||||
|
||||
public function getLastLocation()
|
||||
{
|
||||
if(preg_match('~Location: (.+)~i', $this->lastHeader, $matches)) {
|
||||
return trim($matches[1]);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public function getLastNonce()
|
||||
{
|
||||
if (preg_match('~Replay\-Nonce: (.+)~i', $this->lastHeader, $matches)) {
|
||||
return trim($matches[1]);
|
||||
}
|
||||
|
||||
public function getLastCode()
|
||||
{
|
||||
return $this->lastCode;
|
||||
}
|
||||
$this->curl('GET', '/directory');
|
||||
return $this->getLastNonce();
|
||||
}
|
||||
|
||||
public function getLastLinks()
|
||||
{
|
||||
preg_match_all('~Link: <(.+)>;rel="up"~', $this->lastHeader, $matches);
|
||||
return $matches[1];
|
||||
}
|
||||
public function getLastLocation()
|
||||
{
|
||||
if (preg_match('~Location: (.+)~i', $this->lastHeader, $matches)) {
|
||||
return trim($matches[1]);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public function getLastCode()
|
||||
{
|
||||
return $this->lastCode;
|
||||
}
|
||||
|
||||
public function getLastLinks()
|
||||
{
|
||||
preg_match_all('~Link: <(.+)>;rel="up"~', $this->lastHeader, $matches);
|
||||
return $matches[1];
|
||||
}
|
||||
}
|
||||
|
||||
class Base64UrlSafeEncoder
|
||||
{
|
||||
public static function encode($input)
|
||||
{
|
||||
return str_replace('=', '', strtr(base64_encode($input), '+/', '-_'));
|
||||
}
|
||||
|
||||
public static function decode($input)
|
||||
{
|
||||
$remainder = strlen($input) % 4;
|
||||
if ($remainder) {
|
||||
$padlen = 4 - $remainder;
|
||||
$input .= str_repeat('=', $padlen);
|
||||
}
|
||||
return base64_decode(strtr($input, '-_', '+/'));
|
||||
}
|
||||
public static function encode($input)
|
||||
{
|
||||
return str_replace('=', '', strtr(base64_encode($input), '+/', '-_'));
|
||||
}
|
||||
|
||||
public static function decode($input)
|
||||
{
|
||||
$remainder = strlen($input) % 4;
|
||||
if ($remainder) {
|
||||
$padlen = 4 - $remainder;
|
||||
$input .= str_repeat('=', $padlen);
|
||||
}
|
||||
return base64_decode(strtr($input, '-_', '+/'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,6 +65,8 @@
|
||||
</content>
|
||||
</file>
|
||||
<file name="/etc/apache2/modules.d/80_acme.conf">
|
||||
<visibility mode="true">{{settings.system.leenabled}}
|
||||
</visibility>
|
||||
<content><![CDATA[
|
||||
Alias "/.well-known/acme-challenge" "{{settings.system.letsencryptchallengepath}}/.well-known/acme-challenge"
|
||||
<Directory "{{settings.system.letsencryptchallengepath}}/.well-known/acme-challenge">
|
||||
@@ -95,6 +97,8 @@ Alias "/.well-known/acme-challenge" "{{settings.system.letsencryptchallengepath}
|
||||
</content>
|
||||
</file>
|
||||
<file name="/etc/apache2/modules.d/80_acme.conf">
|
||||
<visibility mode="true">{{settings.system.leenabled}}
|
||||
</visibility>
|
||||
<content><![CDATA[
|
||||
Alias "/.well-known/acme-challenge" "{{settings.system.letsencryptchallengepath}}/.well-known/acme-challenge"
|
||||
<Directory "{{settings.system.letsencryptchallengepath}}/.well-known/acme-challenge">
|
||||
@@ -264,6 +268,8 @@ fastcgi_param REDIRECT_STATUS 200;
|
||||
</content>
|
||||
</file>
|
||||
<file name="/etc/nginx/acme.conf">
|
||||
<visibility mode="true">{{settings.system.leenabled}}
|
||||
</visibility>
|
||||
<content><![CDATA[
|
||||
location /.well-known/acme-challenge {
|
||||
alias {{settings.system.letsencryptchallengepath}}/.well-known/acme-challenge;
|
||||
@@ -1061,11 +1067,11 @@ program_directory = /usr/libexec/postfix
|
||||
sendmail_path = /usr/sbin/sendmail
|
||||
|
||||
## General Postfix configuration
|
||||
# should be the default domain from your provider eg. "server100.provider.tld"
|
||||
# FQDN from Froxlor
|
||||
mydomain = <SERVERNAME>
|
||||
|
||||
# should be different from $mydomain eg. "mail.$mydomain"
|
||||
myhostname = mail.$mydomain
|
||||
# set myhostname to $mydomain because Froxlor alrady uses a FQDN
|
||||
myhostname = $mydomain
|
||||
|
||||
mydestination = $myhostname,
|
||||
$mydomain,
|
||||
|
||||
@@ -40,14 +40,14 @@
|
||||
</visibility>
|
||||
<content><![CDATA[mkdir -p {{settings.system.deactivateddocroot}}]]></content>
|
||||
</command>
|
||||
<command><![CDATA[a2dismod userdir]]></command>
|
||||
<command><![CDATA[a2enmod headers]]></command>
|
||||
</commands>
|
||||
</general>
|
||||
<!-- HTTP Apache -->
|
||||
<daemon name="apache" version="2.4" title="Apache 2.4" default="true">
|
||||
<install><![CDATA[apt-get install apache2]]></install>
|
||||
<include>//service[@type='http']/general/commands</include>
|
||||
<command><![CDATA[a2dismod userdir]]></command>
|
||||
<command><![CDATA[a2enmod headers]]></command>
|
||||
<command>
|
||||
<visibility mode="true">{{settings.phpfpm.enabled}}
|
||||
</visibility>
|
||||
@@ -69,6 +69,8 @@
|
||||
</content>
|
||||
</file>
|
||||
<file name="/etc/apache2/conf-enabled/acme.conf">
|
||||
<visibility mode="true">{{settings.system.leenabled}}
|
||||
</visibility>
|
||||
<content><![CDATA[
|
||||
Alias "/.well-known/acme-challenge" "{{settings.system.letsencryptchallengepath}}/.well-known/acme-challenge"
|
||||
<Directory "{{settings.system.letsencryptchallengepath}}/.well-known/acme-challenge">
|
||||
@@ -286,6 +288,8 @@ fastcgi_param REDIRECT_STATUS 200;
|
||||
</content>
|
||||
</file>
|
||||
<file name="/etc/nginx/acme.conf">
|
||||
<visibility mode="true">{{settings.system.leenabled}}
|
||||
</visibility>
|
||||
<content><![CDATA[
|
||||
location /.well-known/acme-challenge {
|
||||
alias {{settings.system.letsencryptchallengepath}}/.well-known/acme-challenge;
|
||||
@@ -1115,23 +1119,12 @@ data_directory = /var/lib/postfix
|
||||
#
|
||||
#default_privs = nobody
|
||||
|
||||
# INTERNET HOST AND DOMAIN NAMES
|
||||
#
|
||||
# The myhostname parameter specifies the internet hostname of this
|
||||
# mail system. The default is to use the fully-qualified domain name
|
||||
# from gethostname(). $myhostname is used as a default value for many
|
||||
# other configuration parameters.
|
||||
#
|
||||
myhostname = mail.$mydomain
|
||||
#myhostname = virtual.domain.tld
|
||||
|
||||
# The mydomain parameter specifies the local internet domain name.
|
||||
# The default is to use $myhostname minus the first component.
|
||||
# $mydomain is used as a default value for many other configuration
|
||||
# parameters.
|
||||
#
|
||||
# FQDN from Froxlor
|
||||
mydomain = <SERVERNAME>
|
||||
|
||||
# set myhostname to $mydomain because Froxlor alrady uses a FQDN
|
||||
myhostname = $mydomain
|
||||
|
||||
# SENDING MAIL
|
||||
#
|
||||
# The myorigin parameter specifies the domain that locally-posted
|
||||
@@ -4029,6 +4022,72 @@ aliases: files
|
||||
<command><![CDATA[/etc/init.d/nscd restart]]></command>
|
||||
<!-- clear group chache -->
|
||||
<command><![CDATA[nscd --invalidate=group]]></command>
|
||||
<!-- @TODO separate the following mkdir command from the previous nscd -->
|
||||
<command>
|
||||
<visibility mode="notisdir">/etc/insserv/overrides</visibility>
|
||||
<content><![CDATA[mkdir -p /etc/insserv/overrides]]></content>
|
||||
</command>
|
||||
<file name="/etc/insserv/overrides/apache2" chown="root:root" chmod="0644">
|
||||
<visibility mode="equals" value="apache2">{{settings.system.webserver}}</visibility>
|
||||
<content><![CDATA[
|
||||
#!/bin/sh
|
||||
### BEGIN INIT INFO
|
||||
# Provides: apache2
|
||||
# Required-Start: $local_fs $remote_fs $network $syslog nscd
|
||||
# Required-Stop: $local_fs $remote_fs $network $syslog
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: Start/stop apache2 web server
|
||||
### END INIT INFO
|
||||
]]>
|
||||
</content>
|
||||
</file>
|
||||
<file name="/etc/insserv/overrides/lighttpd" chown="root:root" chmod="0644">
|
||||
<visibility mode="equals" value="lighttpd">{{settings.system.webserver}}</visibility>
|
||||
<content><![CDATA[
|
||||
#!/bin/sh
|
||||
### BEGIN INIT INFO
|
||||
# Provides: lighttpd
|
||||
# Required-Start: $local_fs $remote_fs $network $syslog nscd
|
||||
# Required-Stop: $local_fs $remote_fs $network $syslog
|
||||
# Should-Start: fam
|
||||
# Should-Stop: fam
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: Start the lighttpd web server.
|
||||
### END INIT INFO
|
||||
]]>
|
||||
</content>
|
||||
</file>
|
||||
<file name="/etc/insserv/overrides/nginx" chown="root:root" chmod="0644">
|
||||
<visibility mode="equals" value="nginx">{{settings.system.webserver}}</visibility>
|
||||
<content><![CDATA[
|
||||
#!/bin/sh
|
||||
### BEGIN INIT INFO
|
||||
# Provides: nginx
|
||||
# Required-Start: $local_fs $remote_fs $network $syslog $named nscd
|
||||
# Required-Stop: $local_fs $remote_fs $network $syslog $named
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: starts the nginx web server
|
||||
### END INIT INFO
|
||||
]]>
|
||||
</content>
|
||||
</file>
|
||||
<file name="/etc/insserv/overrides/nscd" chown="root:root" chmod="0644">
|
||||
<content><![CDATA[
|
||||
#!/bin/sh
|
||||
### BEGIN INIT INFO
|
||||
# Provides: nscd
|
||||
# Required-Start: $remote_fs $syslog mysql
|
||||
# Required-Stop: $remote_fs $syslog
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: Starts the Name Service Cache Daemon
|
||||
### END INIT INFO
|
||||
]]>
|
||||
</content>
|
||||
</file>
|
||||
</daemon>
|
||||
<!-- Logrotate -->
|
||||
<daemon name="logrotate" title="Logrotate">
|
||||
|
||||
@@ -40,8 +40,6 @@
|
||||
</visibility>
|
||||
<content><![CDATA[mkdir -p {{settings.system.deactivateddocroot}}]]></content>
|
||||
</command>
|
||||
<command><![CDATA[a2dismod userdir]]></command>
|
||||
<command><![CDATA[a2enmod headers]]></command>
|
||||
</commands>
|
||||
</general>
|
||||
<!-- HTTP Apache -->
|
||||
@@ -49,6 +47,8 @@
|
||||
default="true">
|
||||
<install><![CDATA[apt-get install apache2]]></install>
|
||||
<include>//service[@type='http']/general/commands</include>
|
||||
<command><![CDATA[a2dismod userdir]]></command>
|
||||
<command><![CDATA[a2enmod headers]]></command>
|
||||
<file name="/etc/apache2/mods-enabled/fastcgi.conf">
|
||||
<visibility mode="true">{{settings.phpfpm.enabled}}
|
||||
</visibility>
|
||||
@@ -67,6 +67,8 @@
|
||||
</content>
|
||||
</file>
|
||||
<file name="/etc/apache2/conf-enabled/acme.conf">
|
||||
<visibility mode="true">{{settings.system.leenabled}}
|
||||
</visibility>
|
||||
<content><![CDATA[
|
||||
Alias "/.well-known/acme-challenge" "{{settings.system.letsencryptchallengepath}}/.well-known/acme-challenge"
|
||||
<Directory "{{settings.system.letsencryptchallengepath}}/.well-known/acme-challenge">
|
||||
@@ -245,6 +247,8 @@ fastcgi_param REDIRECT_STATUS 200;
|
||||
</content>
|
||||
</file>
|
||||
<file name="/etc/nginx/acme.conf">
|
||||
<visibility mode="true">{{settings.system.leenabled}}
|
||||
</visibility>
|
||||
<content><![CDATA[
|
||||
location /.well-known/acme-challenge {
|
||||
alias {{settings.system.letsencryptchallengepath}}/.well-known/acme-challenge;
|
||||
@@ -512,11 +516,11 @@ root: root@<SERVERNAME>
|
||||
backup="true">
|
||||
<content><![CDATA[
|
||||
## General Postfix configuration
|
||||
# should be the default domain from your provider eg. "server100.provider.tld"
|
||||
# FQDN from Froxlor
|
||||
mydomain = <SERVERNAME>
|
||||
|
||||
# should be different from $mydomain eg. "mail.$mydomain"
|
||||
myhostname = mail.$mydomain
|
||||
# set myhostname to $mydomain because Froxlor alrady uses a FQDN
|
||||
myhostname = $mydomain
|
||||
|
||||
mydestination = $myhostname,
|
||||
$mydomain,
|
||||
|
||||
@@ -40,8 +40,6 @@
|
||||
</visibility>
|
||||
<content><![CDATA[mkdir -p {{settings.system.deactivateddocroot}}]]></content>
|
||||
</command>
|
||||
<command><![CDATA[a2dismod userdir]]></command>
|
||||
<command><![CDATA[a2enmod headers]]></command>
|
||||
</commands>
|
||||
</general>
|
||||
<!-- HTTP Apache -->
|
||||
@@ -49,6 +47,8 @@
|
||||
default="true">
|
||||
<include>//service[@type='http']/general/commands</include>
|
||||
<file name="/etc/httpd/conf.d/acme.conf">
|
||||
<visibility mode="true">{{settings.system.leenabled}}
|
||||
</visibility>
|
||||
<content><![CDATA[
|
||||
Alias "/.well-known/acme-challenge" "{{settings.system.letsencryptchallengepath}}/.well-known/acme-challenge"
|
||||
<Directory "{{settings.system.letsencryptchallengepath}}/.well-known/acme-challenge">
|
||||
@@ -176,11 +176,11 @@ query = SELECT gid FROM mail_users WHERE email = '%s'
|
||||
backup="true">
|
||||
<content><![CDATA[
|
||||
## General Postfix configuration
|
||||
|
||||
# FQDN from Froxlor
|
||||
mydomain = <SERVERNAME>
|
||||
|
||||
# should be different from $mydomain eg. "mail.$mydomain"
|
||||
myhostname = mail.$mydomain
|
||||
# set myhostname to $mydomain because Froxlor alrady uses a FQDN
|
||||
myhostname = $mydomain
|
||||
|
||||
mydestination = $myhostname,
|
||||
$mydomain,
|
||||
|
||||
@@ -40,8 +40,6 @@
|
||||
</visibility>
|
||||
<content><![CDATA[mkdir -p {{settings.system.deactivateddocroot}}]]></content>
|
||||
</command>
|
||||
<command><![CDATA[a2dismod userdir]]></command>
|
||||
<command><![CDATA[a2enmod headers]]></command>
|
||||
</commands>
|
||||
</general>
|
||||
<!-- HTTP Apache -->
|
||||
@@ -49,6 +47,8 @@
|
||||
default="true">
|
||||
<install><![CDATA[apt-get install apache2]]></install>
|
||||
<include>//service[@type='http']/general/commands</include>
|
||||
<command><![CDATA[a2dismod userdir]]></command>
|
||||
<command><![CDATA[a2enmod headers]]></command>
|
||||
<file name="/etc/apache2/mods-enabled/fastcgi.conf">
|
||||
<visibility mode="true">{{settings.phpfpm.enabled}}
|
||||
</visibility>
|
||||
@@ -67,11 +67,13 @@
|
||||
</content>
|
||||
</file>
|
||||
<file name="/etc/apache2/conf-enabled/acme.conf">
|
||||
<visibility mode="true">{{settings.system.leenabled}}
|
||||
</visibility>
|
||||
<content><![CDATA[
|
||||
Alias "/.well-known/acme-challenge" "{{settings.system.letsencryptchallengepath}}/.well-known/acme-challenge"
|
||||
<Directory "{{settings.system.letsencryptchallengepath}}/.well-known/acme-challenge">
|
||||
Order Deny,Allow
|
||||
Deny from All
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
</Directory>
|
||||
]]>
|
||||
</content>
|
||||
@@ -81,6 +83,8 @@ Alias "/.well-known/acme-challenge" "{{settings.system.letsencryptchallengepath}
|
||||
<daemon name="apache" version="2.4" title="Apache 2.4">
|
||||
<install><![CDATA[apt-get install apache2]]></install>
|
||||
<include>//service[@type='http']/general/commands</include>
|
||||
<command><![CDATA[a2dismod userdir]]></command>
|
||||
<command><![CDATA[a2enmod headers]]></command>
|
||||
<file name="/etc/apache2/mods-enabled/fastcgi.conf">
|
||||
<visibility mode="true">{{settings.phpfpm.enabled}}
|
||||
</visibility>
|
||||
@@ -97,6 +101,8 @@ Alias "/.well-known/acme-challenge" "{{settings.system.letsencryptchallengepath}
|
||||
</content>
|
||||
</file>
|
||||
<file name="/etc/apache2/conf-enabled/acme.conf">
|
||||
<visibility mode="true">{{settings.system.leenabled}}
|
||||
</visibility>
|
||||
<content><![CDATA[
|
||||
Alias "/.well-known/acme-challenge" "{{settings.system.letsencryptchallengepath}}/.well-known/acme-challenge"
|
||||
<Directory "{{settings.system.letsencryptchallengepath}}/.well-known/acme-challenge">
|
||||
@@ -274,6 +280,8 @@ fastcgi_param REDIRECT_STATUS 200;
|
||||
</content>
|
||||
</file>
|
||||
<file name="/etc/nginx/acme.conf">
|
||||
<visibility mode="true">{{settings.system.leenabled}}
|
||||
</visibility>
|
||||
<content><![CDATA[
|
||||
location /.well-known/acme-challenge {
|
||||
alias {{settings.system.letsencryptchallengepath}}/.well-known/acme-challenge;
|
||||
@@ -541,11 +549,11 @@ root: root@<SERVERNAME>
|
||||
backup="true">
|
||||
<content><![CDATA[
|
||||
## General Postfix configuration
|
||||
# should be the default domain from your provider eg. "server100.provider.tld"
|
||||
# FQDN from Froxlor
|
||||
mydomain = <SERVERNAME>
|
||||
|
||||
# should be different from $mydomain eg. "mail.$mydomain"
|
||||
myhostname = mail.$mydomain
|
||||
# set myhostname to $mydomain because Froxlor alrady uses a FQDN
|
||||
myhostname = $mydomain
|
||||
|
||||
mydestination = $myhostname,
|
||||
$mydomain,
|
||||
@@ -1357,8 +1365,8 @@ TLSLog /var/log/proftpd/tls.log
|
||||
TLSProtocol TLSv1 TLSv1.1 TLSv1.2
|
||||
TLSRSACertificateFile /etc/ssl/certs/proftpd.crt
|
||||
TLSRSACertificateKeyFile /etc/ssl/private/proftpd.key
|
||||
TLSECCertificateFile /etc/ssl/certs/proftpd_ec.crt
|
||||
TLSECCertificateKeyFile /etc/ssl/private/proftpd_ec.key
|
||||
#TLSECCertificateFile /etc/ssl/certs/proftpd_ec.crt
|
||||
#TLSECCertificateKeyFile /etc/ssl/private/proftpd_ec.key
|
||||
TLSOptions NoCertRequest NoSessionReuseRequired
|
||||
TLSVerifyClient off
|
||||
|
||||
|
||||
@@ -40,8 +40,6 @@
|
||||
</visibility>
|
||||
<content><![CDATA[mkdir -p {{settings.system.deactivateddocroot}}]]></content>
|
||||
</command>
|
||||
<command><![CDATA[a2dismod userdir]]></command>
|
||||
<command><![CDATA[a2enmod headers]]></command>
|
||||
</commands>
|
||||
</general>
|
||||
<!-- HTTP Apache -->
|
||||
@@ -49,6 +47,8 @@
|
||||
default="true">
|
||||
<install><![CDATA[apt-get install apache2]]></install>
|
||||
<include>//service[@type='http']/general/commands</include>
|
||||
<command><![CDATA[a2dismod userdir]]></command>
|
||||
<command><![CDATA[a2enmod headers]]></command>
|
||||
<file name="/etc/apache2/mods-enabled/fastcgi.conf">
|
||||
<visibility mode="true">{{settings.phpfpm.enabled}}
|
||||
</visibility>
|
||||
@@ -66,12 +66,14 @@
|
||||
]]>
|
||||
</content>
|
||||
</file>
|
||||
<file name="/etc/apache2/conf-enabled/acme.conf">
|
||||
<file name="/etc/apache2/conf.d/acme.conf">
|
||||
<visibility mode="true">{{settings.system.leenabled}}
|
||||
</visibility>
|
||||
<content><![CDATA[
|
||||
Alias "/.well-known/acme-challenge" "{{settings.system.letsencryptchallengepath}}/.well-known/acme-challenge"
|
||||
<Directory "{{settings.system.letsencryptchallengepath}}/.well-known/acme-challenge">
|
||||
Order Deny,Allow
|
||||
Deny from All
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
</Directory>
|
||||
]]>
|
||||
</content>
|
||||
@@ -81,6 +83,8 @@ Alias "/.well-known/acme-challenge" "{{settings.system.letsencryptchallengepath}
|
||||
<daemon name="apache" version="2.4" title="Apache 2.4">
|
||||
<install><![CDATA[apt-get install apache2]]></install>
|
||||
<include>//service[@type='http']/general/commands</include>
|
||||
<command><![CDATA[a2dismod userdir]]></command>
|
||||
<command><![CDATA[a2enmod headers]]></command>
|
||||
<file name="/etc/apache2/mods-enabled/fastcgi.conf">
|
||||
<visibility mode="true">{{settings.phpfpm.enabled}}
|
||||
</visibility>
|
||||
@@ -97,6 +101,8 @@ Alias "/.well-known/acme-challenge" "{{settings.system.letsencryptchallengepath}
|
||||
</content>
|
||||
</file>
|
||||
<file name="/etc/apache2/conf-enabled/acme.conf">
|
||||
<visibility mode="true">{{settings.system.leenabled}}
|
||||
</visibility>
|
||||
<content><![CDATA[
|
||||
Alias "/.well-known/acme-challenge" "{{settings.system.letsencryptchallengepath}}/.well-known/acme-challenge"
|
||||
<Directory "{{settings.system.letsencryptchallengepath}}/.well-known/acme-challenge">
|
||||
@@ -314,6 +320,8 @@ fastcgi_param REDIRECT_STATUS 200;
|
||||
</content>
|
||||
</file>
|
||||
<file name="/etc/nginx/acme.conf">
|
||||
<visibility mode="true">{{settings.system.leenabled}}
|
||||
</visibility>
|
||||
<content><![CDATA[
|
||||
location /.well-known/acme-challenge {
|
||||
alias {{settings.system.letsencryptchallengepath}}/.well-known/acme-challenge;
|
||||
@@ -950,29 +958,12 @@ data_directory = /var/lib/postfix
|
||||
#default_privs = nobody
|
||||
|
||||
# INTERNET HOST AND DOMAIN NAMES
|
||||
#
|
||||
# The myhostname parameter specifies the internet hostname of this
|
||||
# mail system. The default is to use the fully-qualified domain name
|
||||
# from gethostname(). $myhostname is used as a default value for many
|
||||
# other configuration parameters.
|
||||
#
|
||||
# Froxlor Note: $myhostname can and should be the same as $mydomain as long as
|
||||
# you don't intend to send mail to it (it will be considered local, not virtual)
|
||||
# for the case of a subdomain, $mydomain *must* be equal to $myhostname,
|
||||
# otherwise you cannot use the main domain for virtual transport.
|
||||
# also check the note about $mydomain below.
|
||||
myhostname = mail.$mydomain
|
||||
#myhostname = virtual.domain.tld
|
||||
|
||||
# The mydomain parameter specifies the local internet domain name.
|
||||
# The default is to use $myhostname minus the first component.
|
||||
# $mydomain is used as a default value for many other configuration
|
||||
# parameters.
|
||||
#
|
||||
# Froxlor Note: We are using a default here but that may or may not make sense,
|
||||
# depending on your dns configuration, please check yourself.
|
||||
# FQDN from Froxlor
|
||||
mydomain = <SERVERNAME>
|
||||
|
||||
# set myhostname to $mydomain because Froxlor alrady uses a FQDN
|
||||
myhostname = $mydomain
|
||||
|
||||
# SENDING MAIL
|
||||
#
|
||||
# The myorigin parameter specifies the domain that locally-posted
|
||||
|
||||
@@ -129,7 +129,7 @@ while ($fName = readdir($lockDirHandle)) {
|
||||
//
|
||||
fwrite($debugHandler, 'Previous cronjob didn\'t exit clean. PID: ' . $check_pid . "\n");
|
||||
fwrite($debugHandler, 'Removing lockfile: ' . $lockdir . $fName . "\n");
|
||||
unlink($lockdir . $fName);
|
||||
@unlink($lockdir . $fName);
|
||||
|
||||
} else {
|
||||
// Result: A Cronscript with this pid
|
||||
@@ -177,8 +177,7 @@ if (((int)Settings::Get('system.mod_fcgid') == 1 && (int)Settings::Get('system.m
|
||||
$cronlog = FroxlorLogger::getInstanceOf(array('loginname' => 'cronjob'));
|
||||
fwrite($debugHandler, 'Logger has been included' . "\n");
|
||||
|
||||
if (Settings::Get('panel.version') == null
|
||||
|| Settings::Get('panel.version') != $version
|
||||
if (hasUpdates($version) || hasDbUpdates($dbversion)
|
||||
) {
|
||||
if (Settings::Get('system.cron_allowautoupdate') == null
|
||||
|| Settings::Get('system.cron_allowautoupdate') == 0
|
||||
@@ -190,7 +189,7 @@ if (Settings::Get('panel.version') == null
|
||||
unlink($lockfile);
|
||||
$errormessage = "Version of file doesn't match version of database. Exiting...\n\n";
|
||||
$errormessage.= "Possible reason: Froxlor update\n";
|
||||
$errormessage.= "Information: Current version in database: ".Settings::Get('panel.version')." - version of Froxlor files: ".$version."\n";
|
||||
$errormessage.= "Information: Current version in database: ".Settings::Get('panel.version')." (DB: ".Settings::Get('panel.db_version').") - version of Froxlor files: ".$version." (DB: ".$dbversion.")\n";
|
||||
$errormessage.= "Solution: Please visit your Foxlor admin interface for further information.\n";
|
||||
dieWithMail($errormessage);
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ return array(
|
||||
'type' => 'text',
|
||||
'size' => 10
|
||||
),
|
||||
'termination_date' => array(
|
||||
'termination_date' => array(
|
||||
'label' => $lng['domains']['termination_date'],
|
||||
'desc' => $lng['panel']['dateformat'],
|
||||
'type' => 'text',
|
||||
@@ -120,7 +120,7 @@ return array(
|
||||
'value' => array()
|
||||
),
|
||||
'letsencrypt' => array(
|
||||
'visible' => (Settings::Get('system.use_ssl') == '1' ? ($ssl_ipsandports != '' ? true : false) : false),
|
||||
'visible' => (Settings::Get('system.use_ssl') == '1' ? (Settings::Get('system.leenabled') == '1' ? ($ssl_ipsandports != '' ? true : false) : false) : false),
|
||||
'label' => $lng['admin']['letsencrypt']['title'],
|
||||
'desc' => $lng['admin']['letsencrypt']['description'],
|
||||
'type' => 'checkbox',
|
||||
@@ -150,22 +150,6 @@ return array(
|
||||
),
|
||||
'value' => array()
|
||||
),
|
||||
'vhost_usedefaultlocation' => array(
|
||||
'visible' => (Settings::Get('system.webserver') == 'nginx' ? true : false),
|
||||
'label' => $lng['admin']['vhostconfig']['vhost_usedefaultlocation']['title'],
|
||||
'desc' => $lng['admin']['vhostconfig']['vhost_usedefaultlocation']['desc'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||
),
|
||||
'value' => array('1')
|
||||
),
|
||||
'vhostsettingid' => array(
|
||||
'visible' => ($userinfo['change_serversettings'] == '1' ? true : false),
|
||||
'label' => $lng['admin']['vhostsettings']['vhostsettings'],
|
||||
'type' => 'select',
|
||||
'select_var' => $vhostconfigs
|
||||
),
|
||||
'specialsettings' => array(
|
||||
'visible' => ($userinfo['change_serversettings'] == '1' ? true : false),
|
||||
'style' => 'align-top',
|
||||
@@ -223,7 +207,7 @@ return array(
|
||||
),
|
||||
'zonefile' => array(
|
||||
'label' => 'Zonefile',
|
||||
'desc' => $lng['panel']['emptyfordefault'],
|
||||
'desc' => $lng['admin']['bindzonewarning'],
|
||||
'type' => 'text'
|
||||
)
|
||||
)
|
||||
|
||||
@@ -84,7 +84,7 @@ return array(
|
||||
'value' => $result['registration_date'],
|
||||
'size' => 10
|
||||
),
|
||||
'termination_date' => array(
|
||||
'termination_date' => array(
|
||||
'label' => $lng['domains']['termination_date'],
|
||||
'desc' => $lng['panel']['dateformat'],
|
||||
'type' => 'text',
|
||||
@@ -132,7 +132,7 @@ return array(
|
||||
'value' => array($result['ssl_redirect'])
|
||||
),
|
||||
'letsencrypt' => array(
|
||||
'visible' => (Settings::Get('system.use_ssl') == '1' ? ($ssl_ipsandports != '' ? true : false) : false),
|
||||
'visible' => (Settings::Get('system.use_ssl') == '1' ? (Settings::Get('system.leenabled') == '1' ? ($ssl_ipsandports != '' ? true : false) : false) : false),
|
||||
'label' => $lng['admin']['letsencrypt']['title'],
|
||||
'desc' => $lng['admin']['letsencrypt']['description'],
|
||||
'type' => 'checkbox',
|
||||
@@ -162,22 +162,6 @@ return array(
|
||||
),
|
||||
'value' => array($result['speciallogfile'])
|
||||
),
|
||||
'vhost_usedefaultlocation' => array(
|
||||
'visible' => (Settings::Get('system.webserver') == 'nginx' ? true : false),
|
||||
'label' => $lng['admin']['vhostconfig']['vhost_usedefaultlocation']['title'],
|
||||
'desc' => $lng['admin']['vhostconfig']['vhost_usedefaultlocation']['desc'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||
),
|
||||
'value' => array($result['vhost_usedefaultlocation'])
|
||||
),
|
||||
'vhostsettingid' => array(
|
||||
'visible' => ($userinfo['change_serversettings'] == '1' ? true : false),
|
||||
'label' => $lng['admin']['vhostsettings']['vhostsettings'],
|
||||
'type' => 'select',
|
||||
'select_var' => $vhostconfigs
|
||||
),
|
||||
'specialsettings' => array(
|
||||
'visible' => ($userinfo['change_serversettings'] == '1' ? true : false),
|
||||
'style' => 'align-top',
|
||||
@@ -248,7 +232,7 @@ return array(
|
||||
),
|
||||
'zonefile' => array(
|
||||
'label' => 'Zonefile',
|
||||
'desc' => $lng['panel']['emptyfordefault'],
|
||||
'desc' => $lng['admin']['bindzonewarning'],
|
||||
'type' => 'text',
|
||||
'value' => $result['zonefile']
|
||||
)
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2016 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 Formfields
|
||||
*
|
||||
*/
|
||||
|
||||
return array(
|
||||
'vhostconfig_add' => array(
|
||||
'title' => $lng['admin']['vhostsettings']['addsettings'],
|
||||
'image' => 'icons/vhostsettings_add.png',
|
||||
'sections' => array(
|
||||
'section_a' => array(
|
||||
'title' => $lng['admin']['vhostsettings']['addnew'],
|
||||
'image' => 'icons/vhostsettings_add.png',
|
||||
'fields' => array(
|
||||
'description' => array(
|
||||
'label' => $lng['admin']['phpsettings']['description'],
|
||||
'type' => 'text',
|
||||
'maxlength' => 50
|
||||
),
|
||||
'webserver' => array(
|
||||
'label' => $lng['admin']['webserver'],
|
||||
'type' => 'select',
|
||||
'select_var' => $webserver_options
|
||||
),
|
||||
'vhostsettings' => array(
|
||||
'style' => 'align-top',
|
||||
'label' => $lng['admin']['vhostsettings']['vhostsettings'],
|
||||
'type' => 'textarea',
|
||||
'cols' => 100,
|
||||
'rows' => 30
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
@@ -1,50 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2016 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 Formfields
|
||||
*
|
||||
*/
|
||||
|
||||
return array(
|
||||
'vhostconfig_edit' => array(
|
||||
'title' => $lng['admin']['vhostsettings']['editsettings'],
|
||||
'image' => 'icons/vhostsettings_edit.png',
|
||||
'sections' => array(
|
||||
'section_a' => array(
|
||||
'title' => $lng['admin']['vhostsettings']['editsettings'],
|
||||
'image' => 'icons/vhostsettings_edit.png',
|
||||
'fields' => array(
|
||||
'description' => array(
|
||||
'label' => $lng['admin']['phpsettings']['description'],
|
||||
'type' => 'text',
|
||||
'maxlength' => 50,
|
||||
'value' => $result['description']
|
||||
),
|
||||
'webserver' => array(
|
||||
'label' => $lng['admin']['webserver'],
|
||||
'type' => 'select',
|
||||
'select_var' => $webserver_options
|
||||
),
|
||||
'vhostsettings' => array(
|
||||
'style' => 'align-top',
|
||||
'label' => $lng['admin']['vhostsettings']['vhostsettings'],
|
||||
'type' => 'textarea',
|
||||
'cols' => 100,
|
||||
'rows' => 30,
|
||||
'value' => $result['vhostsettings']
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
@@ -60,6 +60,12 @@ return array(
|
||||
'type' => 'select',
|
||||
'select_var' => isset($redirectcode) ? $redirectcode : null
|
||||
),
|
||||
'selectserveralias' => array(
|
||||
'label' => $lng['admin']['selectserveralias'],
|
||||
'desc' => $lng['admin']['selectserveralias_desc'],
|
||||
'type' => 'label',
|
||||
'value' => $lng['customer']['selectserveralias_addinfo']
|
||||
),
|
||||
'ssl_redirect' => array(
|
||||
'visible' => (Settings::Get('system.use_ssl') == '1' ? ($ssl_ipsandports != '' ? true : false) : false),
|
||||
'label' => $lng['domains']['ssl_redirect']['title'],
|
||||
@@ -71,7 +77,7 @@ return array(
|
||||
'value' => array()
|
||||
),
|
||||
'letsencrypt' => array(
|
||||
'visible' => (Settings::Get('system.use_ssl') == '1' ? ($ssl_ipsandports != '' ? true : false) : false),
|
||||
'visible' => (Settings::Get('system.use_ssl') == '1' ? (Settings::Get('system.leenabled') == '1' ? ($ssl_ipsandports != '' ? true : false) : false) : false),
|
||||
'label' => $lng['customer']['letsencrypt']['title'],
|
||||
'desc' => $lng['customer']['letsencrypt']['description'],
|
||||
'type' => 'checkbox',
|
||||
|
||||
@@ -61,7 +61,7 @@ return array(
|
||||
'select_var' => $redirectcode
|
||||
),
|
||||
'selectserveralias' => array(
|
||||
'visible' => (($result['parentdomainid'] == '0' && $userinfo['subdomains'] != '0') ? true : false),
|
||||
'visible' => ((($result['parentdomainid'] == '0' && $userinfo['subdomains'] != '0') || $result['parentdomainid'] != '0') ? true : false),
|
||||
'label' => $lng['admin']['selectserveralias'],
|
||||
'desc' => $lng['admin']['selectserveralias_desc'],
|
||||
'type' => 'select',
|
||||
@@ -87,7 +87,7 @@ return array(
|
||||
'value' => array($result['ssl_redirect'])
|
||||
),
|
||||
'letsencrypt' => array(
|
||||
'visible' => (Settings::Get('system.use_ssl') == '1' ? ($ssl_ipsandports != '' ? (domainHasSslIpPort($result['id']) ? true : false) : false) : false),
|
||||
'visible' => (Settings::Get('system.use_ssl') == '1' ? (Settings::Get('system.leenabled') == '1' ? ($ssl_ipsandports != '' ? (domainHasSslIpPort($result['id']) ? true : false) : false) : false) : false),
|
||||
'label' => $lng['customer']['letsencrypt']['title'],
|
||||
'desc' => $lng['customer']['letsencrypt']['description'],
|
||||
'type' => 'checkbox',
|
||||
|
||||
75
lib/formfields/customer/extras/formfield.backup.php
Normal file
75
lib/formfields/customer/extras/formfield.backup.php
Normal file
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2016 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 Formfields
|
||||
*
|
||||
*/
|
||||
return array(
|
||||
'backup' => array(
|
||||
'title' => $lng['extras']['backup'],
|
||||
'image' => 'icons/backup_big.png',
|
||||
'sections' => array(
|
||||
'section_a' => array(
|
||||
'title' => $lng['extras']['backup'],
|
||||
'image' => 'icons/backup_big.png',
|
||||
'fields' => array(
|
||||
'path' => array(
|
||||
'label' => $lng['panel']['path'],
|
||||
'desc' => (Settings::Get('panel.pathedit') != 'Dropdown' ? $lng['panel']['pathDescription'] : null).(isset($pathSelect['note']) ? '<br />'.$pathSelect['value'] : ''),
|
||||
'type' => $pathSelect['type'],
|
||||
'select_var' => $pathSelect['value'],
|
||||
'value' => $pathSelect['value']
|
||||
),
|
||||
'path_protection_info' => array(
|
||||
'label' => $lng['extras']['path_protection_label'],
|
||||
'type' => 'label',
|
||||
'value' => $lng['extras']['path_protection_info']
|
||||
),
|
||||
'backup_web' => array(
|
||||
'label' => $lng['extras']['backup_web'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array('1')
|
||||
),
|
||||
'backup_mail' => array(
|
||||
'label' => $lng['extras']['backup_mail'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array('1')
|
||||
),
|
||||
'backup_dbs' => array(
|
||||
'label' => $lng['extras']['backup_dbs'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array('1')
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
123
lib/functions/filedir/function.createCustomerBackup.php
Normal file
123
lib/functions/filedir/function.createCustomerBackup.php
Normal file
@@ -0,0 +1,123 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2016 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
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* depending on the give choice, the customers web-data, email-data and databases are being backup'ed
|
||||
*
|
||||
* @param array $data
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
*/
|
||||
function createCustomerBackup($data = null, $customerdocroot = null, &$cronlog)
|
||||
{
|
||||
$cronlog->logAction(CRON_ACTION, LOG_INFO, 'Creating Backup for user "'.$data['loginname'].'"');
|
||||
|
||||
// create tmp folder
|
||||
$tmpdir = makeCorrectDir($data['destdir'] . '/.tmp/');
|
||||
$cronlog->logAction(CRON_ACTION, LOG_DEBUG, 'Creating tmp-folder "'.$tmpdir.'"');
|
||||
$cronlog->logAction(CRON_ACTION, LOG_DEBUG, 'shell> mkdir -p ' . escapeshellarg($tmpdir));
|
||||
safe_exec('mkdir -p ' . escapeshellarg($tmpdir));
|
||||
$create_backup_tar_data = "";
|
||||
|
||||
// MySQL databases
|
||||
if ($data['backup_dbs'] == 1) {
|
||||
|
||||
$cronlog->logAction(CRON_ACTION, LOG_DEBUG, 'Creating mysql-folder "'.makeCorrectDir($tmpdir . '/mysql').'"');
|
||||
$cronlog->logAction(CRON_ACTION, LOG_DEBUG, 'shell> mkdir -p ' . escapeshellarg(makeCorrectDir($tmpdir . '/mysql')));
|
||||
safe_exec('mkdir -p ' . escapeshellarg(makeCorrectDir($tmpdir . '/mysql')));
|
||||
|
||||
// get all customer database-names
|
||||
$sel_stmt = Database::prepare("SELECT `databasename` FROM `" . TABLE_PANEL_DATABASES . "` WHERE `customerid` = :cid");
|
||||
Database::pexecute($sel_stmt, array(
|
||||
'cid' => $data['customerid']
|
||||
));
|
||||
|
||||
Database::needRoot(true);
|
||||
Database::needSqlData();
|
||||
$sql_root = Database::getSqlData();
|
||||
Database::needRoot(false);
|
||||
|
||||
$has_dbs = false;
|
||||
while ($row = $sel_stmt->fetch()) {
|
||||
$cronlog->logAction(CRON_ACTION, LOG_DEBUG, 'shell> mysqldump -u ' . escapeshellarg($sql_root['user']) . ' -pXXXXX ' . $row['databasename'] . ' > ' . makeCorrectFile($tmpdir . '/mysql/' . $row['databasename'] . '_' . date('YmdHi', time()) . '.sql'));
|
||||
$bool_false = false;
|
||||
safe_exec('mysqldump -u ' . escapeshellarg($sql_root['user']) . ' -p' . $sql_root['passwd'] . ' ' . $row['databasename'] . ' > ' . makeCorrectFile($tmpdir . '/mysql/' . $row['databasename'] . '_' . date('YmdHi', time()) . '.sql'), $bool_false, array('>'));
|
||||
$has_dbs = true;
|
||||
}
|
||||
|
||||
if ($has_dbs) {
|
||||
$create_backup_tar_data .= './mysql ';
|
||||
}
|
||||
|
||||
unset($sql_root);
|
||||
}
|
||||
|
||||
// E-mail data
|
||||
if ($data['backup_mail'] == 1) {
|
||||
|
||||
$cronlog->logAction(CRON_ACTION, LOG_DEBUG, 'Creating mail-folder "'.makeCorrectDir($tmpdir . '/mail').'"');
|
||||
safe_exec('mkdir -p ' . escapeshellarg(makeCorrectDir($tmpdir . '/mail')));
|
||||
|
||||
// get all customer mail-accounts
|
||||
$sel_stmt = Database::prepare("SELECT `homedir`, `maildir` FROM `" . TABLE_MAIL_USERS . "` WHERE `customerid` = :cid");
|
||||
Database::pexecute($sel_stmt, array(
|
||||
'cid' => $data['customerid']
|
||||
));
|
||||
|
||||
$tar_file_list = "";
|
||||
$mail_homedir = "";
|
||||
while ($row = $sel_stmt->fetch()) {
|
||||
$tar_file_list .= escapeshellarg("./".$row['maildir']) . " ";
|
||||
$mail_homedir = $row['homedir'];
|
||||
}
|
||||
|
||||
if (! empty($tar_file_list)) {
|
||||
$cronlog->logAction(CRON_ACTION, LOG_DEBUG, 'shell> tar cfvz ' . escapeshellarg(makeCorrectFile($tmpdir . '/mail/' . $data['loginname'] . '-mail.tar.gz')) . ' -C '.escapeshellarg($mail_homedir) . ' ' . trim($tar_file_list));
|
||||
safe_exec('tar cfz ' . escapeshellarg(makeCorrectFile($tmpdir . '/mail/' . $data['loginname'] . '-mail.tar.gz')) . ' -C '.escapeshellarg($mail_homedir) . ' ' . trim($tar_file_list));
|
||||
$create_backup_tar_data .= './mail ';
|
||||
}
|
||||
}
|
||||
|
||||
// Web data
|
||||
if ($data['backup_web'] == 1) {
|
||||
|
||||
$cronlog->logAction(CRON_ACTION, LOG_DEBUG, 'Creating web-folder "'.makeCorrectDir($tmpdir . '/web').'"');
|
||||
safe_exec('mkdir -p ' . escapeshellarg(makeCorrectDir($tmpdir . '/web')));
|
||||
$cronlog->logAction(CRON_ACTION, LOG_DEBUG, 'shell> tar cfz ' . escapeshellarg(makeCorrectFile($tmpdir . '/web/' . $data['loginname'] . '-web.tar.gz')) . ' --exclude=' . escapeshellarg(str_replace($customerdocroot, "./", makeCorrectFile($tmpdir.'/*'))) .' --exclude=' . escapeshellarg(str_replace($customerdocroot, "./", substr(makeCorrectDir($tmpdir), 0, -1))) .' -C '.escapeshellarg($customerdocroot). ' .');
|
||||
safe_exec('tar cfz ' . escapeshellarg(makeCorrectFile($tmpdir . '/web/' . $data['loginname'] . '-web.tar.gz')) . ' --exclude=' . escapeshellarg(str_replace($customerdocroot, "./", makeCorrectFile($tmpdir.'/*'))) .' --exclude=' . escapeshellarg(str_replace($customerdocroot, "./", substr(makeCorrectFile($tmpdir), 0, -1))) .' -C '.escapeshellarg($customerdocroot).' .');
|
||||
$create_backup_tar_data .= './web ';
|
||||
}
|
||||
|
||||
if (!empty($create_backup_tar_data))
|
||||
{
|
||||
$backup_file = makeCorrectFile($tmpdir . '/' . $data['loginname'] . '-backup_' . date('YmdHi', time()) . '.tar.gz');
|
||||
$cronlog->logAction(CRON_ACTION, LOG_INFO, 'Creating backup-file "'.$backup_file.'"');
|
||||
// pack all archives in tmp-dir to one
|
||||
$cronlog->logAction(CRON_ACTION, LOG_DEBUG, 'shell> tar cfz ' . escapeshellarg($backup_file) . ' -C '.escapeshellarg($tmpdir).' '.trim($create_backup_tar_data));
|
||||
safe_exec('tar cfz ' . escapeshellarg($backup_file) . ' -C '.escapeshellarg($tmpdir).' '.trim($create_backup_tar_data));
|
||||
// move to destination directory
|
||||
$cronlog->logAction(CRON_ACTION, LOG_DEBUG, 'shell> mv ' . escapeshellarg($backup_file) . ' ' . escapeshellarg($data['destdir']));
|
||||
safe_exec('mv ' . escapeshellarg($backup_file) . ' ' . escapeshellarg($data['destdir']));
|
||||
// remove tmp-files
|
||||
$cronlog->logAction(CRON_ACTION, LOG_DEBUG, 'shell> rm -rf '.escapeshellarg($tmpdir));
|
||||
safe_exec('rm -rf '.escapeshellarg($tmpdir));
|
||||
// set owner to customer
|
||||
$cronlog->logAction(CRON_ACTION, LOG_DEBUG, 'shell> chown -R ' . (int)$data['uid'] . ':' . (int)$data['gid'] . ' ' . escapeshellarg($data['destdir']));
|
||||
safe_exec('chown -R ' . (int)$data['uid'] . ':' . (int)$data['gid'] . ' ' . escapeshellarg($data['destdir']));
|
||||
}
|
||||
}
|
||||
@@ -108,6 +108,15 @@ function getOutstandingTasks() {
|
||||
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'];
|
||||
|
||||
43
lib/functions/froxlor/function.checkMailAccDeletionState.php
Normal file
43
lib/functions/froxlor/function.checkMailAccDeletionState.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2016 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
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* check whether an email account is to be deleted
|
||||
* reference: #1519
|
||||
*
|
||||
* @return bool true if the domain is to be deleted, false otherwise
|
||||
*
|
||||
*/
|
||||
function checkMailAccDeletionState($email_addr = null)
|
||||
{
|
||||
// example data of task 7: a:2:{s:9:"loginname";s:4:"webX";s:5:"email";s:20:"deleteme@example.tld";}
|
||||
|
||||
// check for task
|
||||
$result_tasks_stmt = Database::prepare("
|
||||
SELECT * FROM `" . TABLE_PANEL_TASKS . "` WHERE `type` = '7' AND `data` LIKE :emailaddr
|
||||
");
|
||||
Database::pexecute($result_tasks_stmt, array(
|
||||
'emailaddr' => "%" . $email_addr . "%"
|
||||
));
|
||||
$num_results = Database::num_rows();
|
||||
|
||||
// is there a task for deleting this email account?
|
||||
if ($num_results > 0) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -101,5 +101,10 @@ function inserttask($type, $param1 = '', $param2 = '', $param3 = '', $param4 = '
|
||||
$data = serialize($data);
|
||||
Database::pexecute($ins_stmt, array('type' => '8', 'data' => $data));
|
||||
|
||||
} elseif ($type == '20'
|
||||
&& is_array($param1)
|
||||
) {
|
||||
$data = serialize($param1);
|
||||
Database::pexecute($ins_stmt, array('type' => '20', 'data' => $data));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
<?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 Daniel Reichelt <hacking@nachtgeist.net> (2016-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Functions
|
||||
*
|
||||
*/
|
||||
|
||||
function triggerLetsEncryptCSRForAliasDestinationDomain($aliasDestinationDomainID, $log)
|
||||
{
|
||||
if (isset($aliasDestinationDomainID) && $aliasDestinationDomainID > 0) {
|
||||
$log->logAction(ADM_ACTION, LOG_INFO, "LetsEncrypt CSR triggered for domain ID " . $aliasDestinationDomainID);
|
||||
$upd_stmt = Database::prepare(
|
||||
"UPDATE
|
||||
`" . TABLE_PANEL_DOMAIN_SSL_SETTINGS . "`
|
||||
SET
|
||||
`expirationdate` = null
|
||||
WHERE
|
||||
domainid = :domainid
|
||||
");
|
||||
Database::pexecute($upd_stmt, array(
|
||||
'domainid' => $aliasDestinationDomainID
|
||||
));
|
||||
}
|
||||
}
|
||||
@@ -188,3 +188,65 @@ function validateUpdateLogFile($filename) {
|
||||
}
|
||||
return '/tmp/froxlor_update.log';
|
||||
}
|
||||
|
||||
/**
|
||||
* Function isDatabaseVersion
|
||||
*
|
||||
* checks if a given database-version is the current one
|
||||
*
|
||||
* @param int $to_check version to check
|
||||
*
|
||||
* @return bool true if version to check matches, else false
|
||||
*/
|
||||
function isDatabaseVersion($to_check = null) {
|
||||
|
||||
if (Settings::Get('panel.frontend') == 'froxlor'
|
||||
&& Settings::Get('panel.db_version') == $to_check
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function hasUpdates
|
||||
*
|
||||
* checks if a given database-version is not equal the current one
|
||||
*
|
||||
* @param int $to_check version to check
|
||||
*
|
||||
* @return bool true if version to check does not match, else false
|
||||
*/
|
||||
function hasDbUpdates($to_check = null) {
|
||||
|
||||
if (Settings::Get('panel.db_version') == null
|
||||
|| Settings::Get('panel.db_version') != $to_check
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function updateToDbVersion
|
||||
*
|
||||
* updates the panel.version field
|
||||
* to the given value (no checks here!)
|
||||
*
|
||||
* @param string $new_version new-version
|
||||
*
|
||||
* @return bool true on success, else false
|
||||
*/
|
||||
function updateToDbVersion($new_version = null) {
|
||||
|
||||
if ($new_version !== null && $new_version != '') {
|
||||
$upd_stmt = Database::prepare("
|
||||
UPDATE `".TABLE_PANEL_SETTINGS."` SET `value` = :newversion
|
||||
WHERE `settinggroup` = 'panel' AND `varname` = 'db_version'"
|
||||
);
|
||||
Database::pexecute($upd_stmt, array('newversion' => $new_version));
|
||||
Settings::Set('panel.db_version', $new_version);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -408,7 +408,7 @@ if (isset($userinfo['loginname'])
|
||||
*/
|
||||
$navigation = "";
|
||||
if (AREA == 'admin' || AREA == 'customer') {
|
||||
if (hasUpdates($version)) {
|
||||
if (hasUpdates($version) || hasDbUpdates($dbversion)) {
|
||||
/*
|
||||
* if froxlor-files have been updated
|
||||
* but not yet configured by the admin
|
||||
|
||||
@@ -124,11 +124,16 @@ return array (
|
||||
'url' => 'customer_extras.php?page=htaccess',
|
||||
'label' => $lng['menue']['extras']['pathoptions'],
|
||||
),
|
||||
array (
|
||||
'url' => 'customer_logger.php?page=log',
|
||||
'label' => $lng['menue']['logger']['logger'],
|
||||
'show_element' => ( Settings::Get('logger.enabled') == true )
|
||||
),
|
||||
array (
|
||||
'url' => 'customer_logger.php?page=log',
|
||||
'label' => $lng['menue']['logger']['logger'],
|
||||
'show_element' => ( Settings::Get('logger.enabled') == true )
|
||||
),
|
||||
array (
|
||||
'url' => 'customer_extras.php?page=backup',
|
||||
'label' => $lng['menue']['extras']['backup'],
|
||||
'show_element' => ( Settings::Get('system.backupenabled') == true ),
|
||||
),
|
||||
),
|
||||
),
|
||||
'traffic' => array (
|
||||
@@ -248,24 +253,6 @@ return array (
|
||||
),
|
||||
),
|
||||
),
|
||||
'templates' => array (
|
||||
'label' => $lng['admin']['server_templates'],
|
||||
'elements' => array (
|
||||
array (
|
||||
'url' => 'admin_vhostsettings.php?page=overview',
|
||||
'label' => $lng['menue']['vhostsettings']['maintitle'],
|
||||
'show_element' => (
|
||||
Settings::Get('system.mod_fcgid') == true ||
|
||||
Settings::Get('phpfpm.enabled') == true
|
||||
),
|
||||
'required_resources' => 'change_serversettings'
|
||||
),
|
||||
array (
|
||||
'url' => 'admin_templates.php?page=email',
|
||||
'label' => $lng['admin']['templates']['email'],
|
||||
),
|
||||
)
|
||||
),
|
||||
'server_php' => array (
|
||||
'label' => $lng['admin']['server_php'],
|
||||
'required_resources' => 'change_serversettings',
|
||||
@@ -308,6 +295,10 @@ return array (
|
||||
'url' => 'admin_settings.php?page=integritycheck',
|
||||
'label' => $lng['admin']['integritycheck'],
|
||||
'required_resources' => 'change_serversettings',
|
||||
),
|
||||
array (
|
||||
'url' => 'admin_templates.php?page=email',
|
||||
'label' => $lng['admin']['templates']['email'],
|
||||
),
|
||||
array (
|
||||
'url' => 'admin_message.php?page=message',
|
||||
|
||||
@@ -45,7 +45,6 @@ define('TABLE_PANEL_TICKETS', 'panel_tickets');
|
||||
define('TABLE_PANEL_TICKET_CATS', 'panel_ticket_categories');
|
||||
define('TABLE_PANEL_LOG', 'panel_syslog');
|
||||
define('TABLE_PANEL_PHPCONFIGS', 'panel_phpconfigs');
|
||||
define('TABLE_PANEL_VHOSTCONFIGS', 'panel_vhostconfigs');
|
||||
define('TABLE_PANEL_CRONRUNS', 'cronjobs_run');
|
||||
define('TABLE_PANEL_REDIRECTCODES', 'redirect_codes');
|
||||
define('TABLE_PANEL_DOMAINREDIRECTS', 'domain_redirect_codes');
|
||||
|
||||
@@ -16,10 +16,10 @@
|
||||
*/
|
||||
|
||||
// Main version variable
|
||||
$version = '0.9.35-rc1';
|
||||
$version = '0.9.36';
|
||||
|
||||
// Database version (unused, old stuff from SysCP)
|
||||
$dbversion = '2';
|
||||
// Database version (YYYYMMDDC where C is a daily counter)
|
||||
$dbversion = '201604270';
|
||||
|
||||
// Distribution branding-tag (used for Debian etc.)
|
||||
$branding = '';
|
||||
|
||||
@@ -259,7 +259,6 @@ $lng['admin']['admin_edit'] = 'Bewerk beheerder';
|
||||
$lng['admin']['customers_see_all'] = 'Kan alle klanten zien?';
|
||||
$lng['admin']['domains_see_all'] = 'Kan alle domeinen zien?';
|
||||
$lng['admin']['change_serversettings'] = 'Kan server instellingen aanpassen?';
|
||||
$lng['admin']['server'] = 'Server';
|
||||
$lng['admin']['serversettings'] = 'Instellingen';
|
||||
$lng['admin']['rebuildconf'] = 'Configuratie bestanden opnieuw aanmaken';
|
||||
$lng['admin']['stdsubdomain'] = 'Standaard subdomein';
|
||||
@@ -311,8 +310,6 @@ $lng['serversettings']['bindconf_directory']['title'] = 'Bind configuratie map';
|
||||
$lng['serversettings']['bindconf_directory']['description'] = 'Waar staan de bind configuratie bestanden?';
|
||||
$lng['serversettings']['bindreload_command']['title'] = 'Bind reload commando';
|
||||
$lng['serversettings']['bindreload_command']['description'] = 'Wat is het command om bind te herladen?';
|
||||
$lng['serversettings']['binddefaultzone']['title'] = 'Bind default zone';
|
||||
$lng['serversettings']['binddefaultzone']['description'] = 'Wat is de naam van de default zone?';
|
||||
$lng['serversettings']['vmail_uid']['title'] = 'Mails-Uid';
|
||||
$lng['serversettings']['vmail_uid']['description'] = 'Welk UserID moeten de e-mails hebben?';
|
||||
$lng['serversettings']['vmail_gid']['title'] = 'Mails-Gid';
|
||||
@@ -695,7 +692,6 @@ $lng['serversettings']['logger']['logcronoption']['once'] = 'Eeenmalig';
|
||||
$lng['serversettings']['logger']['logcronoption']['always'] = 'Altijd';
|
||||
$lng['question']['logger_reallytruncate'] = 'Weet u zeker dat u de tabel "%s" wilt legen?';
|
||||
$lng['admin']['loggersystem'] = 'Systeemlog';
|
||||
$lng['menue']['logger']['logger'] = 'Systeemlog';
|
||||
$lng['logger']['date'] = 'Datum';
|
||||
$lng['logger']['type'] = 'Type';
|
||||
$lng['logger']['action'] = 'Actie';
|
||||
|
||||
@@ -289,7 +289,7 @@ $lng['admin']['admin_edit'] = 'Edit admin';
|
||||
$lng['admin']['customers_see_all'] = 'Can see all customers?';
|
||||
$lng['admin']['domains_see_all'] = 'Can see all domains?';
|
||||
$lng['admin']['change_serversettings'] = 'Can change server settings?';
|
||||
$lng['admin']['server'] = 'Server';
|
||||
$lng['admin']['server'] = 'System';
|
||||
$lng['admin']['serversettings'] = 'Settings';
|
||||
$lng['admin']['rebuildconf'] = 'Rebuild config files';
|
||||
$lng['admin']['stdsubdomain'] = 'Standard subdomain';
|
||||
@@ -318,6 +318,7 @@ $lng['admin']['templates']['USERNAME'] = 'Replaced with the customers account us
|
||||
$lng['admin']['templates']['PASSWORD'] = 'Replaced with the customers account password.';
|
||||
$lng['admin']['templates']['EMAIL'] = 'Replaced with the address of the POP3/IMAP account.';
|
||||
$lng['admin']['webserver'] = 'Webserver';
|
||||
$lng['admin']['bindzonewarning'] = $lng['panel']['emptyfordefault'] . '<br /><strong class="red">ATTENTION:</strong> If you use a zonefile you will have to manage all required records for all sub-zones manually as well.';
|
||||
|
||||
/**
|
||||
* Serversettings
|
||||
@@ -347,8 +348,6 @@ $lng['serversettings']['bindconf_directory']['title'] = 'Bind config directory';
|
||||
$lng['serversettings']['bindconf_directory']['description'] = 'Where should bind configfiles be saved?';
|
||||
$lng['serversettings']['bindreload_command']['title'] = 'Bind reload command';
|
||||
$lng['serversettings']['bindreload_command']['description'] = 'What\'s the bind command to reload bind configfiles?';
|
||||
$lng['serversettings']['binddefaultzone']['title'] = 'Bind default zone';
|
||||
$lng['serversettings']['binddefaultzone']['description'] = 'What\'s the name of the default zone?';
|
||||
$lng['serversettings']['vmail_uid']['title'] = 'Mails-UID';
|
||||
$lng['serversettings']['vmail_uid']['description'] = 'Which UserID should mails have?';
|
||||
$lng['serversettings']['vmail_gid']['title'] = 'Mails-GID';
|
||||
@@ -743,8 +742,7 @@ $lng['serversettings']['logger']['logcronoption']['never'] = 'Never';
|
||||
$lng['serversettings']['logger']['logcronoption']['once'] = 'Once';
|
||||
$lng['serversettings']['logger']['logcronoption']['always'] = 'Always';
|
||||
$lng['question']['logger_reallytruncate'] = 'Do you really want to truncate the table "%s"?';
|
||||
$lng['admin']['loggersystem'] = 'System-logging';
|
||||
$lng['menue']['logger']['logger'] = 'System-logging';
|
||||
$lng['admin']['loggersystem'] = 'System log';
|
||||
$lng['logger']['date'] = 'Date';
|
||||
$lng['logger']['type'] = 'Type';
|
||||
$lng['logger']['action'] = 'Action';
|
||||
@@ -953,6 +951,7 @@ $lng['admin']['phpconfig']['admin_email'] = 'Will be replaced with e-mail addres
|
||||
$lng['admin']['phpconfig']['domain'] = 'Will be replaced with the domain.';
|
||||
$lng['admin']['phpconfig']['customer'] = 'Will be replaced with the loginname of the customer who owns this domain.';
|
||||
$lng['admin']['phpconfig']['admin'] = 'Will be replaced with the loginname of the admin who owns this domain.';
|
||||
$lng['admin']['phpconfig']['docroot'] = 'Will be replaces with the customer\'s document-root.';
|
||||
$lng['login']['backtologin'] = 'Back to login';
|
||||
$lng['serversettings']['mod_fcgid']['starter']['title'] = 'Processes per domain';
|
||||
$lng['serversettings']['mod_fcgid']['starter']['description'] = 'How many processes should be started/allowed per domain? The value 0 is recommended cause PHP will then manage the amount of processes itself very efficiently.';
|
||||
@@ -1173,7 +1172,7 @@ $lng['serversettings']['ftpserver']['desc'] = 'If pureftpd is selected the .ftpq
|
||||
$lng['mails']['new_ftpaccount_by_customer']['subject'] = 'New ftp-user created';
|
||||
$lng['mails']['new_ftpaccount_by_customer']['mailbody'] = "Hello {CUST_NAME},\n\nyou have just added a new ftp-user. Here is the entered information:\n\nUsername: {USR_NAME}\nPassword: {USR_PASS}\nPath: {USR_PATH}\n\nYours sincerely, your administrator";
|
||||
$lng['domains']['redirectifpathisurl'] = 'Redirect code (default: empty)';
|
||||
$lng['domains']['redirectifpathisurlinfo'] = 'You only need to select one of these if you entered an URL as path';
|
||||
$lng['domains']['redirectifpathisurlinfo'] = 'You only need to select one of these if you entered an URL as path<br/><strong class="red">NOTE:</strong>Changes are only applied if the given path is an URL.';
|
||||
$lng['serversettings']['customredirect_enabled']['title'] = 'Allow customer redirects';
|
||||
$lng['serversettings']['customredirect_enabled']['description'] = 'Allow customers to choose the http-status code for redirects which will be used';
|
||||
$lng['serversettings']['customredirect_default']['title'] = 'Default redirect';
|
||||
@@ -1762,7 +1761,9 @@ $lng['admin']['templates']['SERVER_HOSTNAME'] = 'Replaces the system-hostname (U
|
||||
$lng['admin']['templates']['SERVER_IP'] = 'Replaces the default server ip-address';
|
||||
$lng['admin']['templates']['SERVER_PORT'] = 'Replaces the default server port';
|
||||
$lng['admin']['templates']['DOMAINNAME'] = 'Replaces the customers standard-subdomain (can be empty if none is generated)';
|
||||
$lng['admin']['show_news_feed'] = 'Show news-feed on admin-dashboard';
|
||||
$lng['admin']['show_news_feed']['title'] = 'Show news-feed on admin-dashboard';
|
||||
$lng['admin']['show_news_feed']['description'] = 'Enable this to show the official froxlor newsfeed (https://inside.froxlor.org/news/) on your dashboard and never miss important information or release-announcements.';
|
||||
$lng['panel']['newsfeed_disabled'] = 'The newsfeed is disabled. Click the edit icon to go to the settings.';
|
||||
|
||||
// Added in Froxlor 0.9.32
|
||||
$lng['logger']['reseller'] = "Reseller";
|
||||
@@ -1804,8 +1805,9 @@ $lng['serversettings']['system_cron_allowautoupdate']['description'] = '<div cla
|
||||
$lng['error']['passwordshouldnotbeusername'] = 'The password should not be the same as the username.';
|
||||
|
||||
// Added in Froxlor 0.9.33
|
||||
$lng['admin']['customer_show_news_feed'] = "Show custom newsfeed on customer-dashboard";
|
||||
$lng['admin']['customer_news_feed_url'] = "RSS-Feed for the custom newsfeed";
|
||||
$lng['admin']['customer_show_news_feed'] = "Show newsfeed on customer-dashboard";
|
||||
$lng['admin']['customer_news_feed_url']['title'] = "Use custom RSS-feed";
|
||||
$lng['admin']['customer_news_feed_url']['description'] = "Specify a custom RSS-feed that will be shown to your customers on their dashboard.<br /><small>Leave this empty to use the official froxlor newsfeed (https://inside.froxlor.org/news/).</small>";
|
||||
$lng['serversettings']['dns_createhostnameentry'] = "Create bind-zone/config for system hostname";
|
||||
$lng['serversettings']['panel_password_alpha_lower']['title'] = 'Lowercase character';
|
||||
$lng['serversettings']['panel_password_alpha_lower']['description'] = 'Password must contain at least one lowercase letter (a-z).';
|
||||
@@ -1929,26 +1931,27 @@ $lng['opcacheinfo']['false'] = '<i>false</i>';
|
||||
|
||||
// Added for let's encrypt
|
||||
$lng['admin']['letsencrypt']['title'] = 'Use Let\'s Encrypt';
|
||||
$lng['admin']['letsencrypt']['description'] = 'Get a free certificate from <a href="https://letsencrypt.org">Let\'s Encrypt</a>. The certificate will be created and renewed automatically.<br><strong class="red">ATTENTION:</strong>If wildcards are enabled, this option will automatically be disabled. This feature is still in beta.';
|
||||
$lng['admin']['letsencrypt']['description'] = 'Get a free certificate from <a href="https://letsencrypt.org">Let\'s Encrypt</a>. The certificate will be created and renewed automatically.<br><strong class="red">ATTENTION:</strong> If wildcards are enabled, this option will automatically be disabled. This feature is still in beta.';
|
||||
$lng['customer']['letsencrypt']['title'] = 'Use Let\'s Encrypt';
|
||||
$lng['customer']['letsencrypt']['description'] = 'Get a free certificate from <a href="https://letsencrypt.org">Let\'s Encrypt</a>. The certificate will be created and renewed automatically.<br><string class="red">ATTENTION:"</strong>This feature is still in beta.';
|
||||
$lng['customer']['letsencrypt']['description'] = 'Get a free certificate from <a href="https://letsencrypt.org">Let\'s Encrypt</a>. The certificate will be created and renewed automatically.<br><strong class="red">ATTENTION:</strong> This feature is still in beta.';
|
||||
$lng['error']['sslredirectonlypossiblewithsslipport'] = 'Using Let\'s Encrypt is only possible when the domain has at least one ssl-enabled IP/port combination assigned.';
|
||||
$lng['error']['nowildcardwithletsencrypt'] = 'Let\'s Encrypt cannot (yet) handle wildcard-domains. Please set the ServerAlias to WWW or disable it completely';
|
||||
$lng['error']['letsencryptdoesnotworkwithaliasdomains'] = "Usage of Let's Encrypt is not possible for aliasdomains at the moment. Please disable Let's Encrypt or AliasDomain";
|
||||
$lng['panel']['letsencrypt'] = 'Using Let\'s encrypt';
|
||||
$lng['crondesc']['cron_letsencrypt'] = 'updating Let\'s Encrypt certificates';
|
||||
$lng['serversettings']['letsencryptca']['title'] = "Let's Encrypt environment";
|
||||
$lng['serversettings']['letsencryptca']['description'] = "Environment to be used for Let's Encrypt certificates.<br><strong class=\"red\">ATTENTION:</strong>Let's Encrypt is still in beta</strong>";
|
||||
$lng['serversettings']['letsencryptca']['description'] = "Environment to be used for Let's Encrypt certificates.<br><strong class=\"red\">ATTENTION:</strong> Let's Encrypt is still in beta</strong>";
|
||||
$lng['serversettings']['letsencryptcountrycode']['title'] = "Let's Encrypt country code";
|
||||
$lng['serversettings']['letsencryptcountrycode']['description'] = "2 letter country code used to generate Let's Encrypt certificates.<br><strong class=\"red\">ATTENTION:</strong>Let's Encrypt is still in beta</strong>";
|
||||
$lng['serversettings']['letsencryptcountrycode']['description'] = "2 letter country code used to generate Let's Encrypt certificates.<br><strong class=\"red\">ATTENTION:</strong> Let's Encrypt is still in beta</strong>";
|
||||
$lng['serversettings']['letsencryptstate']['title'] = "Let's Encrypt state";
|
||||
$lng['serversettings']['letsencryptstate']['description'] = "State used to generate Let's Encrypt certificates.<br><strong class=\"red\">ATTENTION:</strong>Let's Encrypt is still in beta</strong>";
|
||||
$lng['serversettings']['letsencryptstate']['description'] = "State used to generate Let's Encrypt certificates.<br><strong class=\"red\">ATTENTION:</strong> Let's Encrypt is still in beta</strong>";
|
||||
$lng['serversettings']['letsencryptchallengepath']['title'] = "Path for Let's Encrypt challenges";
|
||||
$lng['serversettings']['letsencryptchallengepath']['description'] = "Directory where the Let's Encrypt challenges should be offered from via a global alias.<br><strong class=\"red\">ATTENTION:</strong>Let's Encrypt is still in beta</strong>";
|
||||
$lng['serversettings']['letsencryptchallengepath']['description'] = "Directory where the Let's Encrypt challenges should be offered from via a global alias.<br><strong class=\"red\">ATTENTION:</strong> Let's Encrypt is still in beta</strong>";
|
||||
$lng['serversettings']['letsencryptkeysize']['title'] = "Key size for new Let's Encrypt certificates";
|
||||
$lng['serversettings']['letsencryptkeysize']['description'] = "Size of the key in Bits for new Let's Encrypt certificates.<br><strong class=\"red\">ATTENTION:</strong>Let's Encrypt is still in beta</strong>";
|
||||
$lng['serversettings']['letsencryptreuseold']['title'] = "Re-use Let's Encrypt key / CSR";
|
||||
$lng['serversettings']['letsencryptreuseold']['description'] = "If activated, the same key and CSR will be used for every renew, otherwise a new key / CSR will be generated every time.<br><strong class=\"red\">ATTENTION:</strong>Let's Encrypt is still in beta</strong>";
|
||||
$lng['serversettings']['letsencryptkeysize']['description'] = "Size of the key in Bits for new Let's Encrypt certificates.<br><strong class=\"red\">ATTENTION:</strong> Let's Encrypt is still in beta</strong>";
|
||||
$lng['serversettings']['letsencryptreuseold']['title'] = "Re-use Let's Encrypt key";
|
||||
$lng['serversettings']['letsencryptreuseold']['description'] = "If activated, the same key will be used for every renew, otherwise a new key will be generated every time.<br><strong class=\"red\">ATTENTION:</strong> Let's Encrypt is still in beta</strong>";
|
||||
$lng['serversettings']['leenabled']['title'] = "Enable Let's Encrypt";
|
||||
$lng['serversettings']['leenabled']['description'] = "If activated, customers are able to let froxlor automatically generate and renew Let's Encrypt ssl-certificates for domains with a ssl IP/port.<br /><br />Please remember that you need to go through the webserver-configuration when eabled because this feature needs a special configuration.";
|
||||
$lng['domains']['ssl_redirect_temporarilydisabled'] = "<br>The SSL redirect is temporarily deactivated while a new Let's Encrypt certificate is generated. It will be activated again after the certificate was generated.";
|
||||
|
||||
// Autoupdate
|
||||
@@ -1965,28 +1968,25 @@ $lng['error']['autoupdate_8'] = 'The archive could not be extracted :(';
|
||||
$lng['error']['autoupdate_9'] = 'The downloaded file did not pass the integrity check. Please try to update again.';
|
||||
|
||||
$lng['admin']['server_php'] = 'PHP';
|
||||
|
||||
// Added for Termination-date
|
||||
$lng['domains']['termination_date'] = 'Date of termination';
|
||||
$lng['domains']['termination_date_overview'] = 'canceled until ';
|
||||
|
||||
$lng['panel']['set'] = 'Apply';
|
||||
$lng['customer']['selectserveralias_addinfo'] = 'This option can be set when editing the domain. Its initial value is inherited from the parent-domain.';
|
||||
$lng['error']['mailaccistobedeleted'] = "Another account with the same name (%s) is currently being deleted and can therefore not be added at this moment.";
|
||||
|
||||
// Added for Vhost templates
|
||||
$lng['menue']['vhostsettings']['maintitle'] = 'VHost Configurations';
|
||||
$lng['admin']['vhostsettings']['title'] = 'VHost Configuration';
|
||||
$lng['admin']['vhostsettings']['addnew'] = 'Add new configuration';
|
||||
$lng['admin']['vhostsettings']['addsettings'] = 'Create a VHost configuration';
|
||||
$lng['admin']['vhostsettings']['editsettings'] = 'Edit a VHost configuration';
|
||||
$lng['admin']['vhostsettings']['vhostsettings'] = 'Predefined VHost configuration';
|
||||
$lng['admin']['vhostsettings']['novhostsettings'] = 'No predefined VHost configuration';
|
||||
$lng['admin']['vhostconfig']['socket_dir'] = 'Will be replaced with the corresponding Unix socket path, e.g. /var/run/domain-php-fpm.socket.';
|
||||
$lng['admin']['vhostconfig']['docroot'] = 'Will be replaced with the DocumentRoot.';
|
||||
$lng['admin']['vhostconfig']['ip'] = 'Will be replaced with the IP address of the Vhost.';
|
||||
$lng['admin']['vhostconfig']['port'] = 'Will be replaced with the port number of the Vhost.';
|
||||
$lng['admin']['vhostconfig']['scheme'] = 'Will be set to <strong>http</strong> or <strong>https</strong> in case SSL / TLS is activated for the Vhost.';
|
||||
$lng['admin']['vhostconfig']['vhost_usedefaultlocation']['title'] = 'Use the standard Vhost location directives';
|
||||
$lng['admin']['vhostconfig']['vhost_usedefaultlocation']['desc'] = 'If deactivated, the standard Vhost location directives, such as <br>location / { ... }<br> location @rewrites { ... }<br> location ~ ^(.+?\.php)(/.*)?$ { ... }<br> are excluded from the Vhost configuration file.';
|
||||
$lng['question']['vhostsetting_reallydelete'] = 'Do you really want to delete the Vhost template?';
|
||||
$lng['menue']['extras']['backup'] = 'Backup';
|
||||
$lng['extras']['backup'] = 'Create backup';
|
||||
$lng['extras']['backup_web'] = 'Backup web-data';
|
||||
$lng['extras']['backup_mail'] = 'Backup mail-data';
|
||||
$lng['extras']['backup_dbs'] = 'Backup databases';
|
||||
$lng['error']['customerhasongoingbackupjob'] = 'There is already a backup job waiting to be processed, please be patient.';
|
||||
$lng['success']['backupscheduled'] = 'Your backup job has been scheduled. Please wait for it to be processed';
|
||||
$lng['crondesc']['cron_backup'] = 'Process backup jobs';
|
||||
$lng['error']['backupfunctionnotenabled'] = 'The backup function is not enabled';
|
||||
$lng['serversettings']['backupenabled']['title'] = "Enable backup for customers";
|
||||
$lng['serversettings']['backupenabled']['description'] = "If activated, the customer will be able to schedule backup jobs (cron-backup) which generates an archive within his docroot (subdirectory chosable by customer)";
|
||||
$lng['extras']['path_protection_label'] = '<strong class="red">Important</strong>';
|
||||
$lng['extras']['path_protection_info'] = '<strong class="red">We strongly recommend protecting the given path, see "Extras" -> "Directory protection"</strong>';
|
||||
$lng['tasks']['backup_customerfiles'] = 'Backup job for customer %loginname%';
|
||||
|
||||
$lng['admin']['server_templates'] = 'Templates';
|
||||
$lng['error']['domain_nopunycode'] = 'You must not specify punycode (IDNA). The domain will automatically be converted';
|
||||
|
||||
@@ -291,7 +291,7 @@ $lng['admin']['admin_edit'] = 'Modifier un administrateur';
|
||||
$lng['admin']['customers_see_all'] = 'Peut voir tous les comptes ?';
|
||||
$lng['admin']['domains_see_all'] = 'Peut voir tous les Domaines ?';
|
||||
$lng['admin']['change_serversettings'] = 'Peut modifier la configuration du serveur ?';
|
||||
$lng['admin']['server'] = 'Serveur';
|
||||
$lng['admin']['server'] = 'Système';
|
||||
$lng['admin']['serversettings'] = 'Paramètres';
|
||||
$lng['admin']['rebuildconf'] = 'Régénérer la configuration';
|
||||
$lng['admin']['stdsubdomain'] = 'Sous-domaine type';
|
||||
@@ -344,8 +344,6 @@ $lng['serversettings']['bindconf_directory']['title'] = 'Emplacement du dossier
|
||||
$lng['serversettings']['bindconf_directory']['description'] = 'Oû doit être stocké la configuration de Bind / Named ?';
|
||||
$lng['serversettings']['bindreload_command']['title'] = 'Commande de rechargement de Bind / Named';
|
||||
$lng['serversettings']['bindreload_command']['description'] = 'Quelle est la commande pour recharger / redémarrer Bind / Named ?';
|
||||
$lng['serversettings']['binddefaultzone']['title'] = 'Nom du fichier de zone par défaut Bind / Named';
|
||||
$lng['serversettings']['binddefaultzone']['description'] = 'Quel est le nom du fichier de zone par défaut pour Bind / Named ?';
|
||||
$lng['serversettings']['vmail_uid']['title'] = 'UID des e-mails';
|
||||
$lng['serversettings']['vmail_uid']['description'] = 'Quel UID doivent avoir les e-mails ?';
|
||||
$lng['serversettings']['vmail_gid']['title'] = 'GID des e-mails';
|
||||
@@ -734,7 +732,6 @@ $lng['serversettings']['logger']['logcronoption']['once'] = 'Une fois';
|
||||
$lng['serversettings']['logger']['logcronoption']['always'] = 'Toujours';
|
||||
$lng['question']['logger_reallytruncate'] = 'Etes-vous sûr de vouloir vider la table "%s" ?';
|
||||
$lng['admin']['loggersystem'] = 'Log système';
|
||||
$lng['menue']['logger']['logger'] = 'Log système';
|
||||
$lng['logger']['date'] = 'Date';
|
||||
$lng['logger']['type'] = 'Type';
|
||||
$lng['logger']['action'] = 'Action';
|
||||
|
||||
@@ -288,7 +288,6 @@ $lng['admin']['admin_edit'] = 'Admin bearbeiten';
|
||||
$lng['admin']['customers_see_all'] = 'Kann alle Kunden sehen?';
|
||||
$lng['admin']['domains_see_all'] = 'Kann alle Domains sehen?';
|
||||
$lng['admin']['change_serversettings'] = 'Kann Servereinstellungen bearbeiten?';
|
||||
$lng['admin']['server'] = 'Server';
|
||||
$lng['admin']['serversettings'] = 'Einstellungen';
|
||||
$lng['admin']['rebuildconf'] = 'Configs neu schreiben';
|
||||
$lng['admin']['stdsubdomain'] = 'Standardsubdomain';
|
||||
@@ -316,6 +315,7 @@ $lng['admin']['templates']['COMPANY'] = 'Wird mit dem Firmennamen des Kunden ers
|
||||
$lng['admin']['templates']['USERNAME'] = 'Wird mit dem Benutzernamen des neuen Kundenkontos ersetzt.';
|
||||
$lng['admin']['templates']['PASSWORD'] = 'Wird mit dem Passwort des neuen Kundenkontos ersetzt.';
|
||||
$lng['admin']['templates']['EMAIL'] = 'Wird mit der Adresse des neuen E-Mail-Kontos ersetzt.';
|
||||
$lng['admin']['bindzonewarning'] = $lng['panel']['emptyfordefault'] . '<br /><strong class="red">WARNUNG:</strong> Bei der Verwendung einer Zonendatei müssen alle benötigten Records aller Subdomains ebenfalls manuell verwaltet werden.';
|
||||
|
||||
/**
|
||||
* Serversettings
|
||||
@@ -345,8 +345,6 @@ $lng['serversettings']['bindconf_directory']['title'] = 'Bind-Config-Directory';
|
||||
$lng['serversettings']['bindconf_directory']['description'] = 'Wo liegen die Bind-Konfigurationsdateien?';
|
||||
$lng['serversettings']['bindreload_command']['title'] = 'Bind-Reload-Command';
|
||||
$lng['serversettings']['bindreload_command']['description'] = 'Wie heißt das Skript zum Neuladen der Bind-Konfigurationsdateien?';
|
||||
$lng['serversettings']['binddefaultzone']['title'] = 'Bind-Default-Zone';
|
||||
$lng['serversettings']['binddefaultzone']['description'] = 'Wie heißt die Default-Zone für alle Domains?';
|
||||
$lng['serversettings']['vmail_uid']['title'] = 'Mail-UID';
|
||||
$lng['serversettings']['vmail_uid']['description'] = 'Welche UID sollen die E-Mails haben?';
|
||||
$lng['serversettings']['vmail_gid']['title'] = 'Mail-GID';
|
||||
@@ -740,8 +738,7 @@ $lng['serversettings']['logger']['logcronoption']['never'] = 'Nie';
|
||||
$lng['serversettings']['logger']['logcronoption']['once'] = 'Einmalig';
|
||||
$lng['serversettings']['logger']['logcronoption']['always'] = 'Immer';
|
||||
$lng['question']['logger_reallytruncate'] = 'Wollen Sie die Tabelle "%s" wirklich leeren?';
|
||||
$lng['admin']['loggersystem'] = 'System-Logging';
|
||||
$lng['menue']['logger']['logger'] = 'System-Logging';
|
||||
$lng['admin']['loggersystem'] = 'System-Log';
|
||||
$lng['logger']['date'] = 'Datum';
|
||||
$lng['logger']['type'] = 'Typ';
|
||||
$lng['logger']['action'] = 'Aktion';
|
||||
@@ -949,6 +946,7 @@ $lng['admin']['phpconfig']['admin_email'] = 'Wird mit der E-Mail-Adresse des Adm
|
||||
$lng['admin']['phpconfig']['domain'] = 'Wird mit der Domain ersetzt.';
|
||||
$lng['admin']['phpconfig']['customer'] = 'Wird mit dem Loginnamen des Kunden ersetzt, dem die Domain gehört.';
|
||||
$lng['admin']['phpconfig']['admin'] = 'Wird mit dem Loginnamen des Admins ersetzt, dem die Domain gehört.';
|
||||
$lng['admin']['phpconfig']['docroot'] = 'Wird mit dem Heimatverzeichnis des Kunden ersetzt.';
|
||||
$lng['login']['backtologin'] = 'Zurück zum Login';
|
||||
$lng['serversettings']['mod_fcgid']['starter']['title'] = 'Prozesse je Domain';
|
||||
$lng['serversettings']['mod_fcgid']['starter']['description'] = 'Wieviele PHP-Prozesse pro Domain sollen gestartet/erlaubt werden. Der Wert 0 wird empfohlen, da PHP die Anzahl dann selbst effizient verwaltet.';
|
||||
@@ -1166,7 +1164,7 @@ $lng['serversettings']['ftpserver']['desc'] = 'Wenn pureftpd ausgewählt ist, we
|
||||
$lng['mails']['new_ftpaccount_by_customer']['subject'] = 'Neuer FTP-Benutzer erstellt';
|
||||
$lng['mails']['new_ftpaccount_by_customer']['mailbody'] = "Hallo {CUST_NAME},\n\ndu hast gerade einen neuen FTP-Benutzer angelegt. Hier die angegebenen Informationen:\n\nBenutzername: {USR_NAME}\nPasswort: {USR_PASS}\nPfad: {USR_PATH}\n\nVielen Dank, Ihr Administrator";
|
||||
$lng['domains']['redirectifpathisurl'] = 'Redirect-Code (Standard: leer)';
|
||||
$lng['domains']['redirectifpathisurlinfo'] = 'Der Redirect-Code kann gewählt werden, wenn der eingegebene Pfad eine URL ist';
|
||||
$lng['domains']['redirectifpathisurlinfo'] = 'Der Redirect-Code kann gewählt werden, wenn der eingegebene Pfad eine URL ist.<br/><strong class="red">HINWEIS:</strong>Änderungen werden nur wirksam wenn der Pfad eine URL ist.';
|
||||
$lng['serversettings']['customredirect_enabled']['title'] = 'Erlaube Kunden-Redirect';
|
||||
$lng['serversettings']['customredirect_enabled']['description'] = 'Erlaubt es Kunden den HTTP-Status Code für einen Redirect zu wählen';
|
||||
$lng['serversettings']['customredirect_default']['title'] = 'Standard-Redirect';
|
||||
@@ -1489,7 +1487,9 @@ $lng['admin']['templates']['SERVER_HOSTNAME'] = 'Wird mit dem System-Hostname (U
|
||||
$lng['admin']['templates']['SERVER_IP'] = 'Wird mit der Standard-System-IP-Adresse ersetzt';
|
||||
$lng['admin']['templates']['SERVER_PORT'] = 'Wird mit dem Standard-Port ersetzt';
|
||||
$lng['admin']['templates']['DOMAINNAME'] = 'Wird mit der Standardsubdomain des Kunden ersetzt (kann leer sein, wenn keine erstellt werden soll)';
|
||||
$lng['admin']['show_news_feed'] = 'Zeige Newsfeed im Admin-Dashboard';
|
||||
$lng['admin']['show_news_feed']['title'] = 'Zeige Newsfeed im Admin-Dashboard';
|
||||
$lng['admin']['show_news_feed']['description'] = 'Aktiviere diese Option, um das offizielle Froxlor newsfeed (https://inside.froxlor.org/news/) auf deinem Dashboard anzuzeigen und verpasse keine wichtigen Informationen oder Release-Announcements.';
|
||||
$lng['panel']['newsfeed_disabled'] = 'Das Newsfeed ist deaktiviert. Klicke das Editier-Icon, um zu den Einstellungen zu gelangen.';
|
||||
|
||||
// Added in Froxlfor 0.9.32
|
||||
$lng['logger']['reseller'] = "Reseller";
|
||||
@@ -1531,8 +1531,9 @@ $lng['serversettings']['system_cron_allowautoupdate']['description'] = '<strong
|
||||
$lng['error']['passwordshouldnotbeusername'] = 'Das Passwort sollte nicht mit dem Benutzernamen übereinstimmen.';
|
||||
|
||||
// Added in Froxlor 0.9.33
|
||||
$lng['admin']['customer_show_news_feed'] = "Zeige benutzerdefinierten Newsfeed im Kunden-Dashboard";
|
||||
$lng['admin']['customer_news_feed_url'] = "RSS-Feed für den benutzerdefinierten Newsfeed";
|
||||
$lng['admin']['customer_show_news_feed'] = "Zeige Newsfeed im Kunden-Dashboard";
|
||||
$lng['admin']['customer_news_feed_url']['title'] = "Benutzerdefiniertes RSS-Feed";
|
||||
$lng['admin']['customer_news_feed_url']['description'] = "Hier kann ein eigenes RSS-Feed angegeben werden, welches den Kunden auf dem Dashboard angezeigt wird.<br /><small>Leerlassen um das offizielle Froxlor Newsfeed (https://inside.froxlor.org/news/) zu verwenden.</small>";
|
||||
$lng['serversettings']['dns_createhostnameentry'] = "Erstelle bind-Zone/Konfiguration für den System-Hostnamen";
|
||||
$lng['serversettings']['panel_password_alpha_lower']['title'] = 'Kleinbuchstaben';
|
||||
$lng['serversettings']['panel_password_alpha_lower']['description'] = 'Das Passwort muss mindestens einen Kleinbuchstaben (a-z) enthalten.';
|
||||
@@ -1584,49 +1585,61 @@ $lng['admin']['mod_fcgid_umask']['title'] = 'Umask (Standard: 022)';
|
||||
|
||||
// Added for let's encrypt
|
||||
$lng['admin']['letsencrypt']['title'] = 'Benutze Let\'s Encrypt';
|
||||
$lng['admin']['letsencrypt']['description'] = 'Holt ein kostenloses Zertifikat von <a href="https://letsencrypt.org">Let\'s Encrypt</a>. Das Zertifikat wird automatisch erstellt und verlängert.<br><strong class="red">ACHTUNG:</strong>Wenn Wildcards aktiviert sind, wird diese Option automatisch deaktiviert. Dieses Feature befindet sich noch im Test.';
|
||||
$lng['admin']['letsencrypt']['description'] = 'Holt ein kostenloses Zertifikat von <a href="https://letsencrypt.org">Let\'s Encrypt</a>. Das Zertifikat wird automatisch erstellt und verlängert.<br><strong class="red">ACHTUNG:</strong> Wenn Wildcards aktiviert sind, wird diese Option automatisch deaktiviert. Dieses Feature befindet sich noch im Test.';
|
||||
$lng['customer']['letsencrypt']['title'] = 'Benutze Let\'s Encrypt';
|
||||
$lng['customer']['letsencrypt']['description'] = 'Holt ein kostenloses Zertifikat von <a href="https://letsencrypt.org">Let\'s Encrypt</a>. Das Zertifikat wird automatisch erstellt und verlängert.<br><string class="red">ACHTUNG:</strong>Dieses Feature befindet sich noch im Test.';
|
||||
$lng['customer']['letsencrypt']['description'] = 'Holt ein kostenloses Zertifikat von <a href="https://letsencrypt.org">Let\'s Encrypt</a>. Das Zertifikat wird automatisch erstellt und verlängert.<br><strong class="red">ACHTUNG:</strong> Dieses Feature befindet sich noch im Test.';
|
||||
$lng['error']['sslredirectonlypossiblewithsslipport'] = 'Die Nutzung von Let\'s Encrypt ist nur möglich, wenn die Domain mindestens eine IP/Port - Kombination mit aktiviertem SSL zugewiesen hat.';
|
||||
$lng['error']['nowildcardwithletsencrypt'] = 'Let\'s Encrypt kann (noch) nicht mit Wildcard-Domains umgehen. Bitte den ServerAlias auf WWW setzen oder deaktivieren';
|
||||
$lng['error']['letsencryptdoesnotworkwithaliasdomains'] = "Die Nutzung von Let's Encrypt ist mit AliasDomains derzeit nicht möglich. Bitte Let's Encrypt oder AliasDomain deaktivieren";
|
||||
$lng['panel']['letsencrypt'] = 'Benutzt Let\'s encrypt';
|
||||
$lng['crondesc']['cron_letsencrypt'] = 'aktualisiert Let\'s Encrypt Zertifikate';
|
||||
$lng['serversettings']['letsencryptca']['title'] = "Let's Encrypt Umgebung";
|
||||
$lng['serversettings']['letsencryptca']['description'] = "Let's Encrypt - Umgebung, welche genutzt wird um Zertifikate zu bestellen.<br><strong class=\"red\">ACHTUNG:</strong>Let's Encrypt befindet sich noch im Test";
|
||||
$lng['serversettings']['letsencryptca']['description'] = "Let's Encrypt - Umgebung, welche genutzt wird um Zertifikate zu bestellen.<br><strong class=\"red\">ACHTUNG:</strong> Let's Encrypt befindet sich noch im Test";
|
||||
$lng['serversettings']['letsencryptcountrycode']['title'] = "Let's Encrypt Ländercode";
|
||||
$lng['serversettings']['letsencryptcountrycode']['description'] = "2 - stelliger Ländercode, welcher benutzt wird um Let's Encrypt - Zertifikate zu bestellen.<br><strong class=\"red\">ACHTUNG:</strong>Let's Encrypt befindet sich noch im Test";
|
||||
$lng['serversettings']['letsencryptcountrycode']['description'] = "2 - stelliger Ländercode, welcher benutzt wird um Let's Encrypt - Zertifikate zu bestellen.<br><strong class=\"red\">ACHTUNG:</strong> Let's Encrypt befindet sich noch im Test";
|
||||
$lng['serversettings']['letsencryptstate']['title'] = "Let's Encrypt Bundesland";
|
||||
$lng['serversettings']['letsencryptstate']['description'] = "Bundesland, welches benutzt wird um Let's Encrypt - Zertifikate zu bestellen.<br><strong class=\"red\">ACHTUNG:</strong>Let's Encrypt befindet sich noch im Test";
|
||||
$lng['serversettings']['letsencryptstate']['description'] = "Bundesland, welches benutzt wird um Let's Encrypt - Zertifikate zu bestellen.<br><strong class=\"red\">ACHTUNG:</strong> Let's Encrypt befindet sich noch im Test";
|
||||
$lng['serversettings']['letsencryptchallengepath']['title'] = "Verzeichnis für Let's Encrypt challenges";
|
||||
$lng['serversettings']['letsencryptchallengepath']['description'] = "Let's Encrypt challenges werden aus diesem Verzeichnis über einen globalen Alias ausgeliefert.<br><strong class=\"red\">ACHTUNG:</strong>Let's Encrypt befindet sich noch im Test";
|
||||
$lng['serversettings']['letsencryptchallengepath']['description'] = "Let's Encrypt challenges werden aus diesem Verzeichnis über einen globalen Alias ausgeliefert.<br><strong class=\"red\">ACHTUNG:</strong> Let's Encrypt befindet sich noch im Test";
|
||||
$lng['serversettings']['letsencryptkeysize']['title'] = "Schlüsselgröße für neue Let's Encrypt Zertifikate";
|
||||
$lng['serversettings']['letsencryptkeysize']['description'] = "Größe des Schlüssels in Bit für neue Let's Encrypt Zertifikate.<br><strong class=\"red\">ACHTUNG:</strong>Let's Encrypt befindet sich noch im Test";
|
||||
$lng['serversettings']['letsencryptreuseold']['title'] = "Let's Encrypt Schlüssel / CSR wiederverwenden";
|
||||
$lng['serversettings']['letsencryptreuseold']['description'] = "Wenn dies aktiviet ist, werden der alte Schlüssel und CSR bei jeder Verlängerung verwendet, andernfalls wird ein neues Paar generiert.<br><strong class=\"red\">ACHTUNG:</strong>Let's Encrypt befindet sich noch im Test";
|
||||
$lng['serversettings']['letsencryptkeysize']['description'] = "Größe des Schlüssels in Bit für neue Let's Encrypt Zertifikate.<br><strong class=\"red\">ACHTUNG:</strong> Let's Encrypt befindet sich noch im Test";
|
||||
$lng['serversettings']['letsencryptreuseold']['title'] = "Let's Encrypt Schlüssel wiederverwenden";
|
||||
$lng['serversettings']['letsencryptreuseold']['description'] = "Wenn dies aktiviert ist, wird der alte Schlüssel bei jeder Verlängerung verwendet, andernfalls wird ein neues Paar generiert.<br><strong class=\"red\">ACHTUNG:</strong> Let's Encrypt befindet sich noch im Test";
|
||||
$lng['serversettings']['leenabled']['title'] = "Let's Encrypt verwenden";
|
||||
$lng['serversettings']['leenabled']['description'] = "Wenn dies aktiviert ist, können Kunden durch Froxlor automatisch generierte und verlängerbare Let's Encrypt SSL-Zertifikate für Domains mit SSL IP/port nutzen.<br /><br />Bitte die Webserver-Konfiguration beachten wenn aktiviert, da dieses Feature eine spezielle Konfiguration benötigt.";
|
||||
$lng['domains']['ssl_redirect_temporarilydisabled'] = "<br>Die SSL-Umleitung ist, während ein neues Let's Encrypt - Zertifikat erstellt wird, temporär deaktiviert. Die Umleitung wird nach der Zertifikatserstellung wieder aktiviert.";
|
||||
|
||||
// Added for Termination-date
|
||||
$lng['domains']['termination_date'] = 'Kündigungsdatum';
|
||||
$lng['domains']['termination_date_overview'] = 'gekündigt zum ';
|
||||
// Autoupdate
|
||||
$lng['admin']['autoupdate'] = 'Auto-Update';
|
||||
$lng['error']['customized_version'] = 'Es scheint als wäre die Froxlor Installation angepasst worden. Kein Support, sorry.';
|
||||
$lng['error']['autoupdate_0'] = 'Unbekannter Fehler';
|
||||
$lng['error']['autoupdate_1'] = 'PHP Einstellung allow_url_fopen ist deaktiviert. Autoupdate benötigt diese Option, bitte in der php.ini aktivieren.';
|
||||
$lng['error']['autoupdate_2'] = 'PHP Extension Zlib nicht gefunden, bitte prüfen, ob diese installiert und aktiviert ist.';
|
||||
$lng['error']['autoupdate_4'] = 'Das froxlor Archiv konnte nicht auf der Festplatte gespeichert werden :(';
|
||||
$lng['error']['autoupdate_5'] = 'version.froxlor.org gab ungültige Werte zurück :(';
|
||||
$lng['error']['autoupdate_6'] = 'Woops, keine (gültige) Version angegeben für den Download :(';
|
||||
$lng['error']['autoupdate_7'] = 'Das heruntergeladene Archiv konnte nicht gefunden werden :(';
|
||||
$lng['error']['autoupdate_8'] = 'Das Archiv konnte nicht entpackt werden :(';
|
||||
$lng['error']['autoupdate_9'] = 'Die heruntergeladene Datei konnte nicht verifiziert werden. Bitte erneut versuchen zu aktualisieren.';
|
||||
|
||||
$lng['domains']['termination_date'] = 'Kündigungsdatum';
|
||||
$lng['domains']['termination_date_overview'] = 'gekündigt zum ';
|
||||
$lng['panel']['set'] = 'Setzen';
|
||||
$lng['customer']['selectserveralias_addinfo'] = 'Diese Option steht beim Bearbeiten der Domain zur Verfügung. Als Initial-Wert wird die Einstellung der Hauptdomain vererbt.';
|
||||
$lng['error']['mailaccistobedeleted'] = "Ein vorheriges Konto mit dem gleichen Namen (%s) wird aktuell noch gelöscht und kann daher derzeit nicht angelegt werden";
|
||||
|
||||
// Added for Vhost templates
|
||||
$lng['menue']['vhostsettings']['maintitle'] = 'VHost-Konfigurationen';
|
||||
$lng['admin']['vhostsettings']['title'] = 'VHost-Konfiguration';
|
||||
$lng['admin']['vhostsettings']['addnew'] = 'Neue Konfiguration erstellen';
|
||||
$lng['admin']['vhostsettings']['addsettings'] = 'VHost-Konfiguration erstellen';
|
||||
$lng['admin']['vhostsettings']['editsettings'] = 'VHost-Konfiguration bearbeiten';
|
||||
$lng['admin']['vhostsettings']['vhostsettings'] = 'Vordefinierte VHost-Konfiguration';
|
||||
$lng['admin']['vhostsettings']['novhostsettings'] = 'Keine VHost-Konfiguration';
|
||||
$lng['admin']['vhostconfig']['socket_dir'] = 'Wird mit dem jeweiligen Unix Socket Pfad ersetzt (z.B. /var/run/domain-php-fpm.socket).';
|
||||
$lng['admin']['vhostconfig']['docroot'] = 'Wird mit dem DocumentRoot ersetzt.';
|
||||
$lng['admin']['vhostconfig']['ip'] = 'Wird mit der IP-Adresse des Vhosts ersetzt.';
|
||||
$lng['admin']['vhostconfig']['port'] = 'Wird mit dem Port des Vhosts ersetzt.';
|
||||
$lng['admin']['vhostconfig']['scheme'] = 'Wird mit <strong>http</strong> bzw. mit <strong>https</strong> ersetzt, sofern der Vhost SSL/TLS aktiviert hat.';
|
||||
$lng['admin']['vhostconfig']['vhost_usedefaultlocation']['title'] = 'Standard VHost location-Direktiven verwenden';
|
||||
$lng['admin']['vhostconfig']['vhost_usedefaultlocation']['desc'] = 'Wenn deaktiviert, werden Standard VHost-Direktiven wie <br>location / { ... }<br> location @rewrites { ... }<br> location ~ ^(.+?\.php)(/.*)?$ { ... }<br> nicht in die Konfigurationsdatei geschrieben.';
|
||||
$lng['question']['vhostsetting_reallydelete'] = 'Wollen Sie diese VHost-Vorlage wirklich löschen?';
|
||||
$lng['menue']['extras']['backup'] = 'Sicherung';
|
||||
$lng['extras']['backup'] = 'Sicherung erstellen';
|
||||
$lng['extras']['backup_web'] = 'Web-Daten sichern';
|
||||
$lng['extras']['backup_mail'] = 'E-Mail Daten sichern';
|
||||
$lng['extras']['backup_dbs'] = 'Datenbanken sichern';
|
||||
$lng['error']['customerhasongoingbackupjob'] = 'Es gibt noch einen austehenden Backup-Job. Bitte haben Sie etwas Geduld.';
|
||||
$lng['success']['backupscheduled'] = 'Ihre Sicherung wurde erfolgreich geplant. Bitte warten Sie nun, bis diese abgearbeitet wurde.';
|
||||
$lng['crondesc']['cron_backup'] = 'Ausstehende Sicherungen erstellen';
|
||||
$lng['error']['backupfunctionnotenabled'] = 'Die Sicherungs-Funktion is nicht aktiviert';
|
||||
$lng['serversettings']['backupenabled']['title'] = "Backup für Kunden aktivieren";
|
||||
$lng['serversettings']['backupenabled']['description'] = "Wenn dies aktiviert ist, kann der Kunde Sicherungen planen (cron-backup) welche ein Archiv in sein Heimatverzeichnis ablegt (Unterordner vom Kunden wählbar)";
|
||||
$lng['extras']['path_protection_label'] = '<strong class="red">Wichtig</strong>';
|
||||
$lng['extras']['path_protection_info'] = '<strong class="red">Wir raten dringend dazu den angegebenen Pfad zu schützen, siehe "Extras" -> "Verzeichnisschutz"</strong>';
|
||||
$lng['tasks']['backup_customerfiles'] = 'Datensicherung für Kunde %loginname%';
|
||||
|
||||
$lng['admin']['server_templates'] = 'Vorlagen';
|
||||
$lng['error']['domain_nopunycode'] = 'Die Eingabe von Punycode (IDNA) ist nicht notwendig. Die Domain wird automatisch konvertiert.';
|
||||
|
||||
@@ -282,7 +282,7 @@ $lng['admin']['admin_edit'] = 'Modifica admin';
|
||||
$lng['admin']['customers_see_all'] = 'Può vedere tutti i clienti?';
|
||||
$lng['admin']['domains_see_all'] = 'Può vedere tutti i domini?';
|
||||
$lng['admin']['change_serversettings'] = 'Può cambiare le impostazioni del server?';
|
||||
$lng['admin']['server'] = 'Server';
|
||||
$lng['admin']['server'] = 'Sistema';
|
||||
$lng['admin']['serversettings'] = 'Opzioni';
|
||||
$lng['admin']['rebuildconf'] = 'Rigenera configurazione';
|
||||
$lng['admin']['stdsubdomain'] = 'Sottodominio standard';
|
||||
@@ -336,8 +336,6 @@ $lng['serversettings']['bindconf_directory']['title'] = 'Cartella configurazione
|
||||
$lng['serversettings']['bindconf_directory']['description'] = 'Dove sono i file di configurazione per Bind?';
|
||||
$lng['serversettings']['bindreload_command']['title'] = 'Comando riavvio Bind';
|
||||
$lng['serversettings']['bindreload_command']['description'] = 'Qual\'è il comando per riavviare Bind?';
|
||||
$lng['serversettings']['binddefaultzone']['title'] = 'Zona di default Bind';
|
||||
$lng['serversettings']['binddefaultzone']['description'] = 'Qual\'è il nome della zona di default Bind?';
|
||||
$lng['serversettings']['vmail_uid']['title'] = 'UID Email';
|
||||
$lng['serversettings']['vmail_uid']['description'] = 'Che UserID dovrebbe avere l\'utente che gestisce le Email?';
|
||||
$lng['serversettings']['vmail_gid']['title'] = 'GID Email';
|
||||
@@ -716,7 +714,6 @@ $lng['error']['logerror'] = 'Errore Log: %s';
|
||||
$lng['serversettings']['logger']['logcron'] = 'Log cronjobs (one run)';
|
||||
$lng['question']['logger_reallytruncate'] = 'Sei sicuro di voler troncare la tabella "%s"?';
|
||||
$lng['admin']['loggersystem'] = 'Log di Sistema';
|
||||
$lng['menue']['logger']['logger'] = 'Log di Sistema';
|
||||
$lng['logger']['date'] = 'Data';
|
||||
$lng['logger']['type'] = 'Tipo';
|
||||
$lng['logger']['action'] = 'Azione';
|
||||
|
||||
@@ -41,3 +41,4 @@ $lng['domains']['ipandport_ssl_multi']['description'] = $lng['domains']['ipandpo
|
||||
|
||||
$lng['success']['noupdatesavail'] = $lng['update']['noupdatesavail'];
|
||||
$lng['error']['autoupdate_3'] = $lng['error']['customized_version'];
|
||||
$lng['menue']['logger']['logger'] = $lng['admin']['loggersystem'];
|
||||
|
||||
@@ -286,7 +286,7 @@ $lng['admin']['admin_edit'] = 'Editar administrador';
|
||||
$lng['admin']['customers_see_all'] = 'Mostrar todos os clientes';
|
||||
$lng['admin']['domains_see_all'] = 'Mostrar todos os domínios';
|
||||
$lng['admin']['change_serversettings'] = 'Alterar configuraççes do servidor?';
|
||||
$lng['admin']['server'] = 'Servidor';
|
||||
$lng['admin']['server'] = 'Sistema';
|
||||
$lng['admin']['serversettings'] = 'Configurações';
|
||||
$lng['admin']['rebuildconf'] = 'Escrever de novo os configs';
|
||||
$lng['admin']['stdsubdomain'] = 'Subdomínio padrão';
|
||||
@@ -341,8 +341,6 @@ $lng['serversettings']['bindconf_directory']['title'] = 'Diretório de configura
|
||||
$lng['serversettings']['bindconf_directory']['description'] = 'Aonde estão os arquivos de configuração do bind?';
|
||||
$lng['serversettings']['bindreload_command']['title'] = 'Comando de reiniciar o Bind';
|
||||
$lng['serversettings']['bindreload_command']['description'] = 'Qual o comando para reiniciar o bind?';
|
||||
$lng['serversettings']['binddefaultzone']['title'] = 'Bind default zone';
|
||||
$lng['serversettings']['binddefaultzone']['description'] = 'Qual o nome da default zone?';
|
||||
$lng['serversettings']['vmail_uid']['title'] = 'Mails-Uid';
|
||||
$lng['serversettings']['vmail_uid']['description'] = 'Qual UserID os e-mails devem ter?';
|
||||
$lng['serversettings']['vmail_gid']['title'] = 'Mails-Gid';
|
||||
@@ -646,8 +644,7 @@ $lng['serversettings']['logger']['logcronoption']['never'] = 'Nunca';
|
||||
$lng['serversettings']['logger']['logcronoption']['once'] = 'Uma vez';
|
||||
$lng['serversettings']['logger']['logcronoption']['always'] = 'Sempre';
|
||||
$lng['question']['logger_reallytruncate'] = 'Você realmente deseja dividir a tabela "%s"?';
|
||||
$lng['admin']['loggersystem'] = 'Systema-Logging';
|
||||
$lng['menue']['logger']['logger'] = 'Systema-Logging';
|
||||
$lng['admin']['loggersystem'] = 'Sistema-Log';
|
||||
$lng['logger']['date'] = 'Data';
|
||||
$lng['logger']['type'] = 'Tipo';
|
||||
$lng['logger']['action'] = 'Ação';
|
||||
|
||||
@@ -275,7 +275,7 @@ $lng['admin']['admin_edit'] = 'Ändra admin';
|
||||
$lng['admin']['customers_see_all'] = 'Kan se alla kunder?';
|
||||
$lng['admin']['domains_see_all'] = 'Kan se alla domäner?';
|
||||
$lng['admin']['change_serversettings'] = 'Kan ändra serverinställningar?';
|
||||
$lng['admin']['server'] = 'Server';
|
||||
$lng['admin']['server'] = 'Systemet';
|
||||
$lng['admin']['serversettings'] = 'Inställningar';
|
||||
$lng['admin']['rebuildconf'] = 'Uppdatera konfig filer';
|
||||
$lng['admin']['stdsubdomain'] = 'Standard subdomän';
|
||||
@@ -328,8 +328,6 @@ $lng['serversettings']['bindconf_directory']['title'] = 'Bind konfigurationskata
|
||||
$lng['serversettings']['bindconf_directory']['description'] = 'Vilken sökväg skall det vara till bind:s konfigurationsfiler?';
|
||||
$lng['serversettings']['bindreload_command']['title'] = 'Ange sökvägen till programmet som laddar om Bind (reload bind) konfigurationsfiler?';
|
||||
$lng['serversettings']['bindreload_command']['description'] = 'Ange sökvägen till programmet som laddar om Bind (reload bind) konfigurationsfiler?';
|
||||
$lng['serversettings']['binddefaultzone']['title'] = 'Bind standard zone';
|
||||
$lng['serversettings']['binddefaultzone']['description'] = 'Vad är namnet på standard zonen?';
|
||||
$lng['serversettings']['vmail_uid']['title'] = 'Mails-UID';
|
||||
$lng['serversettings']['vmail_uid']['description'] = 'Vilket användarID (UserID) ska E-posten ha?';
|
||||
$lng['serversettings']['vmail_gid']['title'] = 'Mails-GID';
|
||||
|
||||
@@ -20,7 +20,6 @@ define('MASTER_CRONJOB', 1);
|
||||
include_once dirname(dirname(__FILE__)) . '/lib/cron_init.php';
|
||||
|
||||
$jobs_to_run = array();
|
||||
$lastrun_update = array();
|
||||
|
||||
/**
|
||||
* check for --help
|
||||
@@ -45,7 +44,6 @@ for ($x = 1; $x < count($argv); $x++) {
|
||||
if (isset($argv[$x])) {
|
||||
// --force
|
||||
if (strtolower($argv[$x]) == '--force') {
|
||||
$crontasks = makeCorrectFile(FROXLOR_INSTALL_DIR.'/scripts/jobs/cron_tasks.php');
|
||||
// really force re-generating of config-files by
|
||||
// inserting task 1
|
||||
inserttask('1');
|
||||
@@ -53,8 +51,7 @@ for ($x = 1; $x < count($argv); $x++) {
|
||||
inserttask('4');
|
||||
// also regenerate cron.d-file
|
||||
inserttask('99');
|
||||
addToQueue($jobs_to_run, $crontasks);
|
||||
$lastrun_update['tasks'] = $crontasks;
|
||||
addToQueue($jobs_to_run, 'tasks');
|
||||
}
|
||||
elseif (strtolower($argv[$x]) == '--debug') {
|
||||
define('CRON_DEBUG_FLAG', 1);
|
||||
@@ -62,9 +59,8 @@ for ($x = 1; $x < count($argv); $x++) {
|
||||
// --[cronname]
|
||||
elseif (substr(strtolower($argv[$x]), 0, 2) == '--') {
|
||||
if (strlen($argv[$x]) > 3) {
|
||||
$cronfile = makeCorrectFile(FROXLOR_INSTALL_DIR.'/scripts/jobs/cron_'.substr(strtolower($argv[$x]), 2).'.php');
|
||||
addToQueue($jobs_to_run, $cronfile);
|
||||
$lastrun_update[substr(strtolower($argv[$x]), 2)] = $cronfile;
|
||||
$cronname = substr(strtolower($argv[$x]), 2);
|
||||
addToQueue($jobs_to_run, $cronname);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -76,8 +72,9 @@ $cronlog->setCronDebugFlag(defined('CRON_DEBUG_FLAG'));
|
||||
if (count($jobs_to_run) > 0) {
|
||||
// include all jobs we want to execute
|
||||
foreach ($jobs_to_run as $cron) {
|
||||
updateLastRunOfCron($lastrun_update, $cron);
|
||||
require_once $cron;
|
||||
updateLastRunOfCron($cron);
|
||||
$cronfile = getCronFile($cron);
|
||||
require_once $cronfile;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,21 +92,22 @@ checkLastGuid();
|
||||
include_once FROXLOR_INSTALL_DIR . '/lib/cron_shutdown.php';
|
||||
|
||||
// -- helper function
|
||||
function addToQueue(&$jobs_to_run, $cronfile = null, $checkExists = true) {
|
||||
if ($checkExists == false || ($checkExists && file_exists($cronfile))) {
|
||||
if (!in_array($cronfile, $jobs_to_run)) {
|
||||
array_unshift($jobs_to_run, $cronfile);
|
||||
function getCronFile($cronname) {
|
||||
return makeCorrectFile(FROXLOR_INSTALL_DIR.'/scripts/jobs/cron_'.$cronname.'.php');
|
||||
}
|
||||
|
||||
function addToQueue(&$jobs_to_run, $cronname) {
|
||||
if (!in_array($cronname, $jobs_to_run)) {
|
||||
$cronfile = getCronFile($cronname);
|
||||
if (file_exists($cronfile)) {
|
||||
array_unshift($jobs_to_run, $cronname);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function updateLastRunOfCron($update_arr, $cronfile) {
|
||||
foreach ($update_arr as $cron => $cronf) {
|
||||
if ($cronf == $cronfile) {
|
||||
$upd_stmt = Database::prepare("
|
||||
UPDATE `".TABLE_PANEL_CRONRUNS."` SET `lastrun` = UNIX_TIMESTAMP() WHERE `cronfile` = :cron;
|
||||
");
|
||||
Database::pexecute($upd_stmt, array('cron' => $cron));
|
||||
}
|
||||
}
|
||||
function updateLastRunOfCron($cronname) {
|
||||
$upd_stmt = Database::prepare("
|
||||
UPDATE `".TABLE_PANEL_CRONRUNS."` SET `lastrun` = UNIX_TIMESTAMP() WHERE `cronfile` = :cron;
|
||||
");
|
||||
Database::pexecute($upd_stmt, array('cron' => $cronname));
|
||||
}
|
||||
|
||||
114
scripts/jobs/cron_backup.php
Normal file
114
scripts/jobs/cron_backup.php
Normal file
@@ -0,0 +1,114 @@
|
||||
<?php if (!defined('MASTER_CRONJOB')) die('You cannot access this file directly!');
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2016 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 Michael Kaufmann <mkaufmann@nutime.de>
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Cron
|
||||
*
|
||||
* @since 0.9.35.1
|
||||
*
|
||||
*/
|
||||
|
||||
// Check Traffic-Lock
|
||||
if (function_exists('pcntl_fork')) {
|
||||
$BackupLock = makeCorrectFile(dirname($lockfile)."/froxlor_cron_backup.lock");
|
||||
if (file_exists($BackupLock)
|
||||
&& is_numeric($BackupPid=file_get_contents($BackupLock))
|
||||
) {
|
||||
if (function_exists('posix_kill')) {
|
||||
$BackupPidStatus = @posix_kill($BackupPid,0);
|
||||
} else {
|
||||
system("kill -CHLD " . $BackupPid . " 1> /dev/null 2> /dev/null", $BackupPidStatus);
|
||||
$BackupPidStatus = $BackupPidStatus ? false : true;
|
||||
}
|
||||
if ($BackupPidStatus) {
|
||||
$cronlog->logAction(CRON_ACTION, LOG_INFO, 'Backup run already in progress');
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
// Create Backup Log and Fork
|
||||
// We close the database - connection before we fork, so we don't share resources with the child
|
||||
Database::needRoot(false); // this forces the connection to be set to null
|
||||
$BackupPid = pcntl_fork();
|
||||
// Parent
|
||||
if ($BackupPid) {
|
||||
file_put_contents($BackupLock, $BackupPid);
|
||||
// unnecessary to recreate database connection here
|
||||
return 0;
|
||||
|
||||
}
|
||||
//Child
|
||||
elseif ($BackupPid == 0) {
|
||||
posix_setsid();
|
||||
fclose($debugHandler);
|
||||
// re-create db
|
||||
Database::needRoot(false);
|
||||
}
|
||||
//Fork failed
|
||||
else {
|
||||
return 1;
|
||||
}
|
||||
|
||||
} else {
|
||||
if (extension_loaded('pcntl')) {
|
||||
$msg = "PHP compiled with pcntl but pcntl_fork function is not available.";
|
||||
} else {
|
||||
$msg = "PHP compiled without pcntl.";
|
||||
}
|
||||
$cronlog->logAction(CRON_ACTION, LOG_WARNING, $msg." Not forking backup-cron, this may take a long time!");
|
||||
}
|
||||
|
||||
$cronlog->logAction(CRON_ACTION, LOG_INFO, 'cron_backup: started - creating customer backup');
|
||||
|
||||
$result_tasks_stmt = Database::query("
|
||||
SELECT * FROM `" . TABLE_PANEL_TASKS . "` WHERE `type` = '20' ORDER BY `id` ASC
|
||||
");
|
||||
|
||||
$del_stmt = Database::prepare("DELETE FROM `" . TABLE_PANEL_TASKS . "` WHERE `id` = :id");
|
||||
|
||||
$all_jobs = $result_tasks_stmt->fetchAll();
|
||||
foreach ($all_jobs as $row) {
|
||||
|
||||
if ($row['data'] != '') {
|
||||
$row['data'] = unserialize($row['data']);
|
||||
}
|
||||
|
||||
if (is_array($row['data'])) {
|
||||
|
||||
if (isset($row['data']['customerid'])
|
||||
&& isset($row['data']['loginname'])
|
||||
&& isset($row['data']['destdir'])
|
||||
) {
|
||||
$row['data']['destdir'] = makeCorrectDir($row['data']['destdir']);
|
||||
$customerdocroot = makeCorrectDir(Settings::Get('system.documentroot_prefix').'/'.$row['data']['loginname'].'/');
|
||||
|
||||
if (!file_exists($row['data']['destdir'])
|
||||
&& $row['data']['destdir'] != '/'
|
||||
&& $row['data']['destdir'] != Settings::Get('system.documentroot_prefix')
|
||||
&& $row['data']['destdir'] != $customerdocroot
|
||||
) {
|
||||
$cronlog->logAction(CRON_ACTION, LOG_NOTICE, 'Creating backup-destination path for customer: ' . escapeshellarg($row['data']['destdir']));
|
||||
safe_exec('mkdir -p '.escapeshellarg($row['data']['destdir']));
|
||||
}
|
||||
|
||||
createCustomerBackup($row['data'], $customerdocroot, $cronlog);
|
||||
}
|
||||
}
|
||||
|
||||
// remove entry
|
||||
Database::pexecute($del_stmt, array('id' => $row['id']));
|
||||
}
|
||||
|
||||
if (function_exists('pcntl_fork')) {
|
||||
@unlink($BackupLock);
|
||||
die();
|
||||
}
|
||||
@@ -1,4 +1,6 @@
|
||||
<?php if (!defined('MASTER_CRONJOB')) die('You cannot access this file directly!');
|
||||
<?php
|
||||
if (! defined('MASTER_CRONJOB'))
|
||||
die('You cannot access this file directly!');
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
@@ -8,61 +10,123 @@
|
||||
* file that was distributed with this source code. You can also view the
|
||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||
*
|
||||
* @copyright (c) the authors
|
||||
* @author Florian Aders <kontakt-froxlor@neteraser.de>
|
||||
* @author Froxlor team <team@froxlor.org> (2016-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Cron
|
||||
* @copyright (c) the authors
|
||||
* @author Florian Aders <kontakt-froxlor@neteraser.de>
|
||||
* @author Froxlor team <team@froxlor.org> (2016-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Cron
|
||||
*
|
||||
* @since 0.9.35
|
||||
* @since 0.9.35
|
||||
*
|
||||
*/
|
||||
|
||||
$cronlog->logAction(CRON_ACTION, LOG_INFO, "Updating Let's Encrypt certificates");
|
||||
|
||||
$certificates_stmt = Database::query("
|
||||
SELECT domssl.`id`, domssl.`domainid`, domssl.expirationdate, domssl.`ssl_cert_file`, domssl.`ssl_key_file`, domssl.`ssl_ca_file`, domssl.`ssl_csr_file`, dom.`domain`, dom.`iswildcarddomain`, dom.`wwwserveralias`,
|
||||
dom.`documentroot`, dom.`id` as 'domainid', dom.`ssl_redirect`, cust.`leprivatekey`, cust.`lepublickey`, cust.customerid, cust.loginname
|
||||
FROM `".TABLE_PANEL_CUSTOMERS."` as cust, `".TABLE_PANEL_DOMAINS."` dom LEFT JOIN `".TABLE_PANEL_DOMAIN_SSL_SETTINGS."` domssl ON (dom.id = domssl.domainid)
|
||||
WHERE dom.customerid = cust.customerid AND dom.letsencrypt = 1 AND (domssl.expirationdate < DATE_ADD(NOW(), INTERVAL 30 DAY) OR domssl.expirationdate IS NULL)
|
||||
");
|
||||
if (! extension_loaded('curl')) {
|
||||
$cronlog->logAction(CRON_ACTION, LOG_ERR, "Let's Encrypt requires the php cURL extension to be installed.");
|
||||
exit();
|
||||
}
|
||||
|
||||
$updcert_stmt = Database::prepare("
|
||||
REPLACE INTO `".TABLE_PANEL_DOMAIN_SSL_SETTINGS."` SET `id` = :id, `domainid` = :domainid, `ssl_cert_file` = :crt, `ssl_key_file` = :key, `ssl_ca_file` = :ca, `ssl_cert_chainfile` = :fullchain, `ssl_csr_file` = :csr, expirationdate = :expirationdate
|
||||
");
|
||||
$certificates_stmt = Database::query(
|
||||
"
|
||||
SELECT
|
||||
domssl.`id`,
|
||||
domssl.`domainid`,
|
||||
domssl.expirationdate,
|
||||
domssl.`ssl_cert_file`,
|
||||
domssl.`ssl_key_file`,
|
||||
domssl.`ssl_ca_file`,
|
||||
domssl.`ssl_csr_file`,
|
||||
dom.`domain`,
|
||||
dom.`wwwserveralias`,
|
||||
dom.`documentroot`,
|
||||
dom.`id` AS 'domainid',
|
||||
dom.`ssl_redirect`,
|
||||
cust.`leprivatekey`,
|
||||
cust.`lepublickey`,
|
||||
cust.`customerid`,
|
||||
cust.`loginname`
|
||||
FROM
|
||||
`" . TABLE_PANEL_CUSTOMERS . "` AS cust,
|
||||
`" . TABLE_PANEL_DOMAINS . "` AS dom
|
||||
LEFT JOIN
|
||||
`" . TABLE_PANEL_DOMAIN_SSL_SETTINGS . "` AS domssl ON
|
||||
dom.`id` = domssl.`domainid`
|
||||
WHERE
|
||||
dom.`customerid` = cust.`customerid`
|
||||
AND dom.`letsencrypt` = 1
|
||||
AND dom.`aliasdomain` IS NULL
|
||||
AND dom.`iswildcarddomain` = 0
|
||||
AND (
|
||||
domssl.`expirationdate` < DATE_ADD(NOW(), INTERVAL 30 DAY)
|
||||
OR domssl.`expirationdate` IS NULL
|
||||
)
|
||||
");
|
||||
|
||||
$upddom_stmt = Database::prepare("
|
||||
UPDATE `".TABLE_PANEL_DOMAINS."` SET `ssl_redirect` = '1' WHERE `id` = :domainid
|
||||
");
|
||||
$aliasdomains_stmt = Database::prepare(
|
||||
"
|
||||
SELECT
|
||||
dom.`id` as domainid,
|
||||
dom.`domain`,
|
||||
dom.`wwwserveralias`
|
||||
FROM `" . TABLE_PANEL_DOMAINS . "` AS dom
|
||||
WHERE
|
||||
dom.`aliasdomain` = :id
|
||||
AND dom.`letsencrypt` = 1
|
||||
AND dom.`iswildcarddomain` = 0
|
||||
");
|
||||
|
||||
$updcert_stmt = Database::prepare(
|
||||
"
|
||||
REPLACE INTO
|
||||
`" . TABLE_PANEL_DOMAIN_SSL_SETTINGS . "`
|
||||
SET
|
||||
`id` = :id,
|
||||
`domainid` = :domainid,
|
||||
`ssl_cert_file` = :crt,
|
||||
`ssl_key_file` = :key,
|
||||
`ssl_ca_file` = :ca,
|
||||
`ssl_cert_chainfile` = :chain,
|
||||
`ssl_csr_file` = :csr,
|
||||
`expirationdate` = :expirationdate
|
||||
");
|
||||
|
||||
$upddom_stmt = Database::prepare("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `ssl_redirect` = '1' WHERE `id` = :domainid");
|
||||
|
||||
$changedetected = 0;
|
||||
while ($certrow = $certificates_stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||
$certrows = $certificates_stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||
foreach ($certrows as $certrow) {
|
||||
|
||||
// set logger to corresponding loginname for the log to appear in the users system-log
|
||||
$cronlog = FroxlorLogger::getInstanceOf(array('loginname' => $certrow['loginname']));
|
||||
// set logger to corresponding loginname for the log to appear in the users system-log
|
||||
$cronlog = FroxlorLogger::getInstanceOf(array(
|
||||
'loginname' => $certrow['loginname']
|
||||
));
|
||||
|
||||
// Only renew let's encrypt certificate if no broken ssl_redirect is enabled
|
||||
if ($certrow['ssl_redirect'] != 2)
|
||||
{
|
||||
if ($certrow['ssl_redirect'] != 2) {
|
||||
$cronlog->logAction(CRON_ACTION, LOG_DEBUG, "Updating " . $certrow['domain']);
|
||||
|
||||
if ($certrow['ssl_cert_file']) {
|
||||
$cronlog->logAction(CRON_ACTION, LOG_DEBUG, "letsencrypt using old key / SAN for " . $certrow['domain']);
|
||||
// Parse the old certificate
|
||||
$x509data = openssl_x509_parse($certrow['ssl_cert_file']);
|
||||
$cronlog->logAction(CRON_ACTION, LOG_DEBUG, "Adding SAN entry: " . $certrow['domain']);
|
||||
$domains = array(
|
||||
$certrow['domain']
|
||||
);
|
||||
// add www.<domain> to SAN list
|
||||
if ($certrow['wwwserveralias'] == 1) {
|
||||
$cronlog->logAction(CRON_ACTION, LOG_DEBUG, "Adding SAN entry: www." . $certrow['domain']);
|
||||
$domains[] = 'www.' . $certrow['domain'];
|
||||
}
|
||||
|
||||
// We are interessted in the old SAN - data
|
||||
$san = explode(', ', $x509data['extensions']['subjectAltName']);
|
||||
$domains = array();
|
||||
foreach($san as $dnsname) {
|
||||
$domains[] = substr($dnsname, 4);
|
||||
}
|
||||
} else {
|
||||
$cronlog->logAction(CRON_ACTION, LOG_DEBUG, "letsencrypt generating new key / SAN for " . $certrow['domain']);
|
||||
$domains = array($certrow['domain']);
|
||||
// Add www.<domain> for SAN
|
||||
if ($certrow['wwwserveralias'] == 1) {
|
||||
$domains[] = 'www.' . $certrow['domain'];
|
||||
// add alias domains (and possibly www.<aliasdomain>) to SAN list
|
||||
Database::pexecute($aliasdomains_stmt, array(
|
||||
'id' => $certrow['domainid']
|
||||
));
|
||||
$aliasdomains = $aliasdomains_stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||
foreach ($aliasdomains as $aliasdomain) {
|
||||
$cronlog->logAction(CRON_ACTION, LOG_DEBUG, "Adding SAN entry: " . $aliasdomain['domain']);
|
||||
$domains[] = $aliasdomain['domain'];
|
||||
if ($aliasdomain['wwwserveralias'] == 1) {
|
||||
$cronlog->logAction(CRON_ACTION, LOG_DEBUG, "Adding SAN entry: www." . $aliasdomain['domain']);
|
||||
$domains[] = 'www.' . $aliasdomain['domain'];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,34 +144,34 @@ while ($certrow = $certificates_stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||
$newcert = openssl_x509_parse($return['crt']);
|
||||
|
||||
// Store the new data
|
||||
Database::pexecute($updcert_stmt, array(
|
||||
Database::pexecute($updcert_stmt,
|
||||
array(
|
||||
'id' => $certrow['id'],
|
||||
'domainid' => $certrow['domainid'],
|
||||
'crt' => $return['crt'],
|
||||
'key' => $return['key'],
|
||||
'ca' => $return['chain'],
|
||||
'fullchain' => $return['fullchain'],
|
||||
'chain' => $return['chain'],
|
||||
'csr' => $return['csr'],
|
||||
'expirationdate' => date('Y-m-d H:i:s', $newcert['validTo_time_t'])
|
||||
)
|
||||
);
|
||||
));
|
||||
|
||||
if ($certrow['ssl_redirect'] == 3) {
|
||||
Database::pexecute($upddom_stmt, array(
|
||||
'domainid' => $certrow['domainid']
|
||||
)
|
||||
);
|
||||
'domainid' => $certrow['domainid']
|
||||
));
|
||||
}
|
||||
|
||||
$cronlog->logAction(CRON_ACTION, LOG_INFO, "Updated Let's Encrypt certificate for " . $certrow['domain']);
|
||||
|
||||
$changedetected = 1;
|
||||
|
||||
} catch (Exception $e) {
|
||||
$cronlog->logAction(CRON_ACTION, LOG_ERR, "Could not get Let's Encrypt certificate for " . $certrow['domain'] . ": " . $e->getMessage());
|
||||
$cronlog->logAction(CRON_ACTION, LOG_ERR,
|
||||
"Could not get Let's Encrypt certificate for " . $certrow['domain'] . ": " . $e->getMessage());
|
||||
}
|
||||
} else {
|
||||
$cronlog->logAction(CRON_ACTION, LOG_WARNING, "Skipping Let's Encrypt generation for " . $certrow['domain'] . " due to an enabled ssl_redirect");
|
||||
$cronlog->logAction(CRON_ACTION, LOG_WARNING,
|
||||
"Skipping Let's Encrypt generation for " . $certrow['domain'] . " due to an enabled ssl_redirect");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,5 +182,7 @@ if ($changedetected) {
|
||||
}
|
||||
|
||||
// reset logger
|
||||
$cronlog = FroxlorLogger::getInstanceOf(array('loginname' => 'cronjob'));
|
||||
$cronlog = FroxlorLogger::getInstanceOf(array(
|
||||
'loginname' => 'cronjob'
|
||||
));
|
||||
$cronlog->logAction(CRON_ACTION, LOG_INFO, "Let's Encrypt certificates have been updated");
|
||||
|
||||
@@ -33,13 +33,22 @@ class bind {
|
||||
if (Settings::Get('system.nameservers') != '') {
|
||||
$nameservers = explode(',', Settings::Get('system.nameservers'));
|
||||
foreach ($nameservers as $nameserver) {
|
||||
$nameserver_ip = gethostbyname(trim($nameserver));
|
||||
$nameserver = trim($nameserver);
|
||||
// DNS servers might be multi homed; allow transfer from all ip
|
||||
// addresses of the DNS server
|
||||
$nameserver_ips = gethostbynamel($nameserver);
|
||||
// append dot to hostname
|
||||
if (substr($nameserver, -1, 1) != '.') {
|
||||
$nameserver.= '.';
|
||||
}
|
||||
// ignore invalid responses
|
||||
if (!is_array($nameserver_ips)) {
|
||||
// act like gethostbyname() and return unmodified hostname on error
|
||||
$nameserver_ips = array($nameserver);
|
||||
}
|
||||
$this->nameservers[] = array(
|
||||
'hostname' => trim($nameserver),
|
||||
'ip' => trim($nameserver_ip)
|
||||
'hostname' => $nameserver,
|
||||
'ips' => $nameserver_ips
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -112,8 +121,8 @@ class bind {
|
||||
}
|
||||
|
||||
if (empty($domains)) {
|
||||
$this->logger->logAction(CRON_ACTION, LOG_INFO, 'No domains found for nameserver-config, skipping...');
|
||||
return;
|
||||
$this->logger->logAction(CRON_ACTION, LOG_INFO, 'No domains found for nameserver-config, skipping...');
|
||||
return;
|
||||
}
|
||||
|
||||
// collect domain IDs of direct child domains as arrays in ['children'] column
|
||||
@@ -194,20 +203,23 @@ class bind {
|
||||
$subzones.= $this->walkDomainList($domains[$child_domain_id], $domains);
|
||||
}
|
||||
|
||||
if ($domain['ismainbutsubto'] == 0 && $domain['zonefile'] == '') {
|
||||
$zonefile = $this->generateZone($domain);
|
||||
$domain['zonefile'] = 'domains/' . $domain['domain'] . '.zone';
|
||||
$zonefile_name = makeCorrectFile(Settings::Get('system.bindconf_directory') . '/' . $domain['zonefile']);
|
||||
$this->_known_filenames[] = basename($zonefile_name);
|
||||
$zonefile_handler = fopen($zonefile_name, 'w');
|
||||
fwrite($zonefile_handler, $zonefile.$subzones);
|
||||
fclose($zonefile_handler);
|
||||
$this->logger->logAction(CRON_ACTION, LOG_INFO, '`' . $zonefile_name . '` zone written');
|
||||
if ($domain['zonefile'] == '') {
|
||||
if ($domain['ismainbutsubto'] == 0) {
|
||||
$zonefile = $this->generateZone($domain);
|
||||
$domain['zonefile'] = 'domains/' . $domain['domain'] . '.zone';
|
||||
$zonefile_name = makeCorrectFile(Settings::Get('system.bindconf_directory') . '/' . $domain['zonefile']);
|
||||
$this->_known_filenames[] = basename($zonefile_name);
|
||||
$zonefile_handler = fopen($zonefile_name, 'w');
|
||||
fwrite($zonefile_handler, $zonefile.$subzones);
|
||||
fclose($zonefile_handler);
|
||||
$this->logger->logAction(CRON_ACTION, LOG_INFO, '`' . $zonefile_name . '` zone written');
|
||||
$this->_bindconf_file .= $this->_generateDomainConfig($domain);
|
||||
} else {
|
||||
return $this->generateZone($domain);
|
||||
}
|
||||
} else {
|
||||
return $this->generateZone($domain);
|
||||
}
|
||||
|
||||
if ($zonefile !== '') {
|
||||
$this->logger->logAction(CRON_ACTION, LOG_INFO, 'Added zonefile ' . $domain['zonefile'] . ' for domain ' . $domain['domain'] .
|
||||
' - Note that you will also have to handle ALL records for ALL subdomains.');
|
||||
$this->_bindconf_file .= $this->_generateDomainConfig($domain);
|
||||
}
|
||||
}
|
||||
@@ -233,7 +245,9 @@ class bind {
|
||||
// put nameservers in allow-transfer
|
||||
if (count($this->nameservers) > 0) {
|
||||
foreach ($this->nameservers as $ns) {
|
||||
$bindconf_file.= ' ' . $ns['ip'] . ';' . "\n";
|
||||
foreach($ns["ips"] as $ip) {
|
||||
$bindconf_file.= ' ' . $ip . ";\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
// AXFR server #100
|
||||
|
||||
@@ -866,22 +866,6 @@ class apache extends HttpConfigBase {
|
||||
}
|
||||
$vhost_content .= $this->getLogfiles($domain);
|
||||
|
||||
// check if vhost config template is set and if so, merge it
|
||||
if ($domain['vhostsettingid'] != 0) {
|
||||
$vhostsettings_stmt = Database::prepare("SELECT `description`, `vhostsettings` FROM " . TABLE_PANEL_VHOSTCONFIGS . "
|
||||
WHERE `webserver` = 'apache2' AND `id` = :id LIMIT 1;");
|
||||
$vhostconfig = Database::pexecute_first($vhostsettings_stmt, array('id' => $domain['vhostsettingid']));
|
||||
|
||||
if (is_array($vhostconfig)) {
|
||||
$vhost_content .= $this->processSpecialConfigTemplate(
|
||||
$vhostconfig['vhostsettings'],
|
||||
$domain,
|
||||
$domain['ip'],
|
||||
$domain['port'],
|
||||
$ssl_vhost) . "\n";
|
||||
}
|
||||
}
|
||||
|
||||
if ($domain['specialsettings'] != '') {
|
||||
$vhost_content .= $this->processSpecialConfigTemplate(
|
||||
$domain['specialsettings'],
|
||||
|
||||
@@ -164,7 +164,7 @@ class lighttpd extends HttpConfigBase {
|
||||
}
|
||||
|
||||
if ($row_ipsandports['ssl_cert_file'] != '') {
|
||||
|
||||
|
||||
// check for existence, #1485
|
||||
if (!file_exists($row_ipsandports['ssl_cert_file'])) {
|
||||
$this->logger->logAction(CRON_ACTION, LOG_ERR, $ip.':'.$port . ' :: certificate file "'.$row_ipsandports['ssl_cert_file'].'" does not exist! Cannot create ssl-directives');
|
||||
@@ -175,7 +175,7 @@ class lighttpd extends HttpConfigBase {
|
||||
$this->lighttpd_data[$vhost_filename].= 'ssl.cipher-list = "' . Settings::Get('system.ssl_cipher_list') . '"' . "\n";
|
||||
$this->lighttpd_data[$vhost_filename].= 'ssl.honor-cipher-order = "enable"' . "\n";
|
||||
$this->lighttpd_data[$vhost_filename].= 'ssl.pemfile = "' . makeCorrectFile($row_ipsandports['ssl_cert_file']) . '"' . "\n";
|
||||
|
||||
|
||||
if ($row_ipsandports['ssl_ca_file'] != '') {
|
||||
// check for existence, #1485
|
||||
if (!file_exists($row_ipsandports['ssl_ca_file'])) {
|
||||
@@ -455,22 +455,6 @@ class lighttpd extends HttpConfigBase {
|
||||
|
||||
$vhost_content.= $this->getSslSettings($domain, $ssl_vhost);
|
||||
|
||||
// check if vhost config template is set and if so, merge it
|
||||
if ($domain['vhostsettingid'] != 0) {
|
||||
$vhostsettings_stmt = Database::prepare("SELECT `description`, `vhostsettings` FROM " . TABLE_PANEL_VHOSTCONFIGS . "
|
||||
WHERE `webserver` = 'lighttpd' AND `id` = :id LIMIT 1;");
|
||||
$vhostconfig = Database::pexecute_first($vhostsettings_stmt, array('id' => $domain['vhostsettingid']));
|
||||
|
||||
if (is_array($vhostconfig)) {
|
||||
$vhost_content .= $this->processSpecialConfigTemplate(
|
||||
$vhostconfig['vhostsettings'],
|
||||
$domain,
|
||||
$domain['ip'],
|
||||
$domain['port'],
|
||||
$ssl_vhost) . "\n";
|
||||
}
|
||||
}
|
||||
|
||||
if ($domain['specialsettings'] != "") {
|
||||
$vhost_content.= $this->processSpecialConfigTemplate(
|
||||
$domain['specialsettings'],
|
||||
@@ -524,7 +508,7 @@ class lighttpd extends HttpConfigBase {
|
||||
}
|
||||
|
||||
if ($domain['ssl_cert_file'] != '') {
|
||||
|
||||
|
||||
$ssl_settings.= 'ssl.engine = "enable"' . "\n";
|
||||
$ssl_settings.= 'ssl.use-sslv2 = "disable"' . "\n";
|
||||
$ssl_settings.= 'ssl.cipher-list = "' . Settings::Get('system.ssl_cipher_list') . '"' . "\n";
|
||||
@@ -534,7 +518,7 @@ class lighttpd extends HttpConfigBase {
|
||||
if ($domain['ssl_ca_file'] != '') {
|
||||
$ssl_settings.= 'ssl.ca-file = "' . makeCorrectFile($domain['ssl_ca_file']) . '"' . "\n";
|
||||
}
|
||||
|
||||
|
||||
if ($domain['hsts'] > 0) {
|
||||
|
||||
$vhost_content .= '$HTTP["scheme"] == "https" { setenv.add-response-header = ( "Strict-Transport-Security" => "max-age=' . $domain['hsts'];
|
||||
|
||||
@@ -155,7 +155,7 @@ class nginx extends HttpConfigBase {
|
||||
/**
|
||||
* this HAS to be set for the default host in nginx or else no vhost will work
|
||||
*/
|
||||
$this->nginx_data[$vhost_filename] .= "\t". 'listen ' . $ip . ':' . $port . ' default'. ($ssl_vhost == true ? ' ssl' : '') . ';' . "\n";
|
||||
$this->nginx_data[$vhost_filename] .= "\t". 'listen ' . $ip . ':' . $port . ' default_server'. ($ssl_vhost == true ? ' ssl' : '') . ';' . "\n";
|
||||
|
||||
$this->nginx_data[$vhost_filename] .= "\t".'# Froxlor default vhost' . "\n";
|
||||
$this->nginx_data[$vhost_filename] .= "\t".'server_name ' . Settings::Get('system.hostname') . ';' . "\n";
|
||||
@@ -422,7 +422,11 @@ class nginx extends HttpConfigBase {
|
||||
) {
|
||||
$vhost_content.= "\n" . $this->composeSslSettings($domain) . "\n";
|
||||
}
|
||||
$vhost_content.= "\t".'include /etc/nginx/acme.conf;'."\n";
|
||||
|
||||
if (Settings::Get('system.use_ssl') == '1' && Settings::Get('system.leenabled') == '1')
|
||||
{
|
||||
$vhost_content.= "\t".'include /etc/nginx/acme.conf;'."\n";
|
||||
}
|
||||
|
||||
// if the documentroot is an URL we just redirect
|
||||
if (preg_match('/^https?\:\/\//', $domain['documentroot'])) {
|
||||
@@ -444,27 +448,6 @@ class nginx extends HttpConfigBase {
|
||||
|
||||
$vhost_content.= isset($this->needed_htpasswds[$domain['id']]) ? $this->needed_htpasswds[$domain['id']] . "\n" : '';
|
||||
|
||||
// check if vhost config template is set and if so, merge it
|
||||
if ($domain['vhostsettingid'] != 0) {
|
||||
$vhostsettings_stmt = Database::prepare("SELECT `description`, `vhostsettings` FROM " . TABLE_PANEL_VHOSTCONFIGS . "
|
||||
WHERE `webserver` = 'nginx' AND `id` = :id LIMIT 1;");
|
||||
$vhostconfig = Database::pexecute_first($vhostsettings_stmt, array('id' => $domain['vhostsettingid']));
|
||||
|
||||
if (is_array($vhostconfig)) {
|
||||
// replace {SOCKET} var with unix socket
|
||||
$php = new phpinterface($domain);
|
||||
$vhostconfig['vhostsettings'] = str_replace("{SOCKET}", $php->getInterface()->getSocketFile(), $vhostconfig['vhostsettings']);
|
||||
|
||||
$vhost_content = $this->mergeVhostCustom($vhost_content, $this->processSpecialConfigTemplate(
|
||||
$vhostconfig['vhostsettings'],
|
||||
$domain,
|
||||
$domain['ip'],
|
||||
$domain['port'],
|
||||
$ssl_vhost
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
if ($domain['specialsettings'] != "") {
|
||||
$vhost_content = $this->mergeVhostCustom($vhost_content, $this->processSpecialConfigTemplate(
|
||||
$domain['specialsettings'],
|
||||
@@ -876,23 +859,20 @@ class nginx extends HttpConfigBase {
|
||||
$this->_deactivated = false;
|
||||
}
|
||||
|
||||
// write directives only when vhost_usedefaultlocation is activated in panel domain settings
|
||||
if ($domain['vhost_usedefaultlocation'] == '1') {
|
||||
$webroot_text .= "\t" . 'index index.php index.html index.htm;'."\n";
|
||||
$webroot_text .= "\n\t" . 'location / {' . "\n";
|
||||
$webroot_text .= "\t\t" . 'try_files $uri $uri/ @rewrites;' . "\n";
|
||||
$webroot_text .= "\t" . 'index index.php index.html index.htm;'."\n";
|
||||
$webroot_text .= "\n\t".'location / {'."\n";
|
||||
$webroot_text .= "\t\t" . 'try_files $uri $uri/ @rewrites;'."\n";
|
||||
|
||||
if ($this->vhost_root_autoindex) {
|
||||
$webroot_text .= "\t\t" . 'autoindex on;' . "\n";
|
||||
$this->vhost_root_autoindex = false;
|
||||
}
|
||||
|
||||
$webroot_text .= "\t" . '}' . "\n\n";
|
||||
$webroot_text .= "\tlocation @rewrites {\n";
|
||||
$webroot_text .= "\t\trewrite ^ /index.php last;\n";
|
||||
$webroot_text .= "\t}\n\n";
|
||||
if ($this->vhost_root_autoindex) {
|
||||
$webroot_text .= "\t\t".'autoindex on;'."\n";
|
||||
$this->vhost_root_autoindex = false;
|
||||
}
|
||||
|
||||
$webroot_text .= "\t".'}'."\n\n";
|
||||
$webroot_text .= "\tlocation @rewrites {\n";
|
||||
$webroot_text .= "\t\trewrite ^ /index.php last;\n";
|
||||
$webroot_text .= "\t}\n\n";
|
||||
|
||||
return $webroot_text;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,27 +23,24 @@ class nginx_phpfpm extends nginx
|
||||
if ($domain['phpenabled'] == '1') {
|
||||
$php = new phpinterface($domain);
|
||||
$phpconfig = $php->getPhpConfig((int)$domain['phpsettingid']);
|
||||
|
||||
$php_options_text = "\t" . 'location ~ ^(.+?\.php)(/.*)?$ {' . "\n";
|
||||
$php_options_text .= "\t\t" . 'try_files ' . $domain['nonexistinguri'] . ' @php;' . "\n";
|
||||
$php_options_text .= "\t" . '}' . "\n\n";
|
||||
|
||||
// write directives only when vhost_usedefaultlocation is activated in panel domain settings
|
||||
if ($domain['vhost_usedefaultlocation'] == '1') {
|
||||
$php_options_text = "\t" . 'location ~ ^(.+?\.php)(/.*)?$ {' . "\n";
|
||||
$php_options_text .= "\t\t" . 'try_files ' . $domain['nonexistinguri'] . ' @php;' . "\n";
|
||||
$php_options_text .= "\t" . '}' . "\n\n";
|
||||
|
||||
$php_options_text .= "\t" . 'location @php {' . "\n";
|
||||
$php_options_text .= "\t\t" . 'try_files $1 = 404;' . "\n\n";
|
||||
$php_options_text .= "\t\t" . 'include ' . Settings::Get('nginx.fastcgiparams') . ";\n";
|
||||
$php_options_text .= "\t\t" . 'fastcgi_split_path_info ^(.+\.php)(/.+)\$;' . "\n";
|
||||
$php_options_text .= "\t\t" . 'fastcgi_param SCRIPT_FILENAME $document_root$1;' . "\n";
|
||||
$php_options_text .= "\t\t" . 'fastcgi_param PATH_INFO $2;' . "\n";
|
||||
if ($domain['ssl'] == '1' && $ssl_vhost) {
|
||||
$php_options_text .= "\t\t" . 'fastcgi_param HTTPS on;' . "\n";
|
||||
}
|
||||
$php_options_text .= "\t\t" . 'fastcgi_pass unix:' . $php->getInterface()->getSocketFile() . ";\n";
|
||||
$php_options_text .= "\t\t" . 'fastcgi_index index.php;' . "\n";
|
||||
$php_options_text .= "\t}\n\n";
|
||||
$php_options_text .= "\t" . 'location @php {' . "\n";
|
||||
$php_options_text .= "\t\t" . 'try_files $1 = 404;' . "\n\n";
|
||||
$php_options_text .= "\t\t" . 'include ' . Settings::Get('nginx.fastcgiparams') . ";\n";
|
||||
$php_options_text .= "\t\t" . 'fastcgi_split_path_info ^(.+\.php)(/.+)\$;' . "\n";
|
||||
$php_options_text .= "\t\t" . 'fastcgi_param SCRIPT_FILENAME $document_root$1;' . "\n";
|
||||
$php_options_text .= "\t\t" . 'fastcgi_param PATH_INFO $2;' . "\n";
|
||||
if ($domain['ssl'] == '1' && $ssl_vhost) {
|
||||
$php_options_text .= "\t\t" . 'fastcgi_param HTTPS on;' . "\n";
|
||||
}
|
||||
|
||||
$php_options_text .= "\t\t" . 'fastcgi_pass unix:' . $php->getInterface()->getSocketFile() . ";\n";
|
||||
$php_options_text .= "\t\t" . 'fastcgi_index index.php;' . "\n";
|
||||
$php_options_text .= "\t}\n\n";
|
||||
|
||||
// create starter-file | config-file
|
||||
$php->getInterface()->createConfig($phpconfig);
|
||||
|
||||
@@ -57,7 +54,7 @@ class nginx_phpfpm extends nginx
|
||||
|
||||
return $php_options_text;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function createOwnVhostStarter() {
|
||||
if (Settings::Get('phpfpm.enabled') == '1'
|
||||
|
||||
@@ -30,8 +30,9 @@ require_once makeCorrectFile(dirname(__FILE__) . '/cron_tasks.inc.http.35.nginx_
|
||||
* LOOK INTO TASKS TABLE TO SEE IF THERE ARE ANY UNDONE JOBS
|
||||
*/
|
||||
$cronlog->logAction(CRON_ACTION, LOG_INFO, "cron_tasks: Searching for tasks to do");
|
||||
// no type 99 (regenerate cron.d-file) and no type 20 (customer backup)
|
||||
$result_tasks_stmt = Database::query("
|
||||
SELECT `id`, `type`, `data` FROM `" . TABLE_PANEL_TASKS . "` WHERE `type` <> '99' ORDER BY `id` ASC
|
||||
SELECT `id`, `type`, `data` FROM `" . TABLE_PANEL_TASKS . "` WHERE `type` <> '99' AND `type` <> '20' ORDER BY `id` ASC
|
||||
");
|
||||
$num_results = Database::num_rows();
|
||||
$resultIDs = array();
|
||||
@@ -165,6 +166,12 @@ while ($row = $result_tasks_stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||
}
|
||||
$cronlog->logAction(CRON_ACTION, LOG_NOTICE, 'Running: chown -R ' . (int)Settings::Get('system.vmail_uid') . ':' . (int)Settings::Get('system.vmail_gid') . ' ' . escapeshellarg($usermaildir));
|
||||
safe_exec('chown -R ' . (int)Settings::Get('system.vmail_uid') . ':' . (int)Settings::Get('system.vmail_gid') . ' ' . escapeshellarg($usermaildir));
|
||||
|
||||
// clear NSCD cache if using fcgid or fpm, #1570
|
||||
if (Settings::Get('system.mod_fcgid') == 1 || (int)Settings::Get('phpfpm.enabled') == 1) {
|
||||
$false_val = false;
|
||||
safe_exec('nscd -i group 1> /dev/null', $false_val, array('>'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -395,7 +402,7 @@ while ($row = $result_tasks_stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,29 +1,29 @@
|
||||
<if $row['termination_date'] != ''>
|
||||
<tr class="{$row['termination_css']}">
|
||||
<if $row['termination_css'] != ''>
|
||||
<tr class="{$row['termination_css']}">
|
||||
</if>
|
||||
<if $row['termination_date'] == ''>
|
||||
<tr>
|
||||
<if $row['termination_css'] == ''>
|
||||
<tr>
|
||||
</if>
|
||||
|
||||
|
||||
<td>{$row['domain']}
|
||||
<if (isset($row['standardsubdomain']) && $row['standardsubdomain'] == $row['id'])>
|
||||
({$lng['admin']['stdsubdomain']})
|
||||
</if>
|
||||
<if $row['termination_date'] != ''>
|
||||
<br><small><div class="red">({$lng['domains']['termination_date_overview']} {$row['termination_date']})</div></small>
|
||||
</if>
|
||||
|
||||
<if $row['termination_date'] != ''>
|
||||
<br><small><div class="red">({$lng['domains']['termination_date_overview']} {$row['termination_date']})</div></small>
|
||||
</if>
|
||||
</td>
|
||||
<td>{$row['ipandport']}</td>
|
||||
<td>{$row['customername']}
|
||||
(<a href="{$linker->getLink(array('section' => 'customers', 'page' => 'customers', 'action' => 'su', 'id' => $row['customerid']))}" rel="external">{$row['loginname']}</a>)
|
||||
<if !empty($row['loginname'])>(<a href="{$linker->getLink(array('section' => 'customers', 'page' => 'customers', 'action' => 'su', 'id' => $row['customerid']))}" rel="external">{$row['loginname']}</a>)</if>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{$linker->getLink(array('section' => 'domains', 'page' => $page, 'action' => 'edit', 'id' => $row['id']))}">
|
||||
<img src="templates/{$theme}/assets/img/icons/edit.png" alt="{$lng['panel']['edit']}" title="{$lng['panel']['edit']}" />
|
||||
</a>
|
||||
<if !(isset($row['domainaliasid']) && $row['domainaliasid'] != 0)>
|
||||
<if $row['letsencrypt'] == '1'>
|
||||
<img src="templates/{$theme}/assets/img/icons/ssl_letsencrypt.png" alt="{$lng['panel']['letsencrypt']}" title="{$lng['panel']['letsencrypt']}" />
|
||||
</if>
|
||||
<if !(isset($row['domainaliasid']) && $row['domainaliasid'] != 0) && $row['id'] != Settings::Get('system.hostname_id')>
|
||||
<if !(isset($row['standardsubdomain']) && $row['standardsubdomain'] == $row['id'])>
|
||||
<a href="{$linker->getLink(array('section' => 'domains', 'page' => $page, 'action' => 'delete', 'id' => $row['id']))}">
|
||||
<img src="templates/{$theme}/assets/img/icons/delete.png" alt="{$lng['panel']['delete']}" title="{$lng['panel']['delete']}" />
|
||||
|
||||
14
templates/Sparkle/admin/index/index.tpl
vendored
14
templates/Sparkle/admin/index/index.tpl
vendored
@@ -182,6 +182,18 @@ $header
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<else>
|
||||
<table class="dboarditem full">
|
||||
<tbody>
|
||||
<tr><td>
|
||||
<img src="templates/{$theme}/assets/img/icons/warning_big.png" alt="" />
|
||||
{$lng['panel']['newsfeed_disabled']}
|
||||
<a href="{$linker->getLink(array('section' => 'settings', 'part' => 'panel'))}">
|
||||
<img src="templates/{$theme}/assets/img/icons/edit_20.png" alt="" />
|
||||
</a>
|
||||
</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</if>
|
||||
|
||||
<if $userinfo['custom_notes'] != '' && $userinfo['custom_notes_show'] == '1'>
|
||||
@@ -245,7 +257,7 @@ $header
|
||||
{$cron_last_runs}
|
||||
<tr>
|
||||
<td>{$lng['admin']['installedversion']}:</td>
|
||||
<td>{$version}{$branding}</td>
|
||||
<td>{$version}{$branding} (DB: {$dbversion})</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{$lng['admin']['latestversion']}:</td>
|
||||
|
||||
2
templates/Sparkle/admin/logger/logger.tpl
vendored
2
templates/Sparkle/admin/logger/logger.tpl
vendored
@@ -19,6 +19,7 @@ $header
|
||||
</div>
|
||||
|
||||
<div class="overviewadd">
|
||||
{$pagingcode}
|
||||
<img src="templates/{$theme}/assets/img/icons/delete.png" alt="" />
|
||||
<a href="{$linker->getLink(array('section' => 'logger', 'page' => 'log', 'action' => 'truncate'))}">{$lng['logger']['truncate']}</a>
|
||||
</div>
|
||||
@@ -40,6 +41,7 @@ $header
|
||||
|
||||
<if 15 < $log_count >
|
||||
<div class="overviewadd">
|
||||
{$pagingcode}
|
||||
<img src="templates/{$theme}/assets/img/icons/delete.png" alt="" />
|
||||
<a href="{$linker->getLink(array('section' => 'logger', 'page' => 'log', 'action' => 'truncate'))}">{$lng['logger']['truncate']}</a>
|
||||
</div>
|
||||
|
||||
@@ -84,6 +84,10 @@ $header
|
||||
<td><em>{ADMIN}</em></td>
|
||||
<td>{$lng['admin']['phpconfig']['admin']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><em>{DOCUMENT_ROOT}</em></td>
|
||||
<td>{$lng['admin']['phpconfig']['docroot']}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -80,6 +80,10 @@ $header
|
||||
<td><em>{ADMIN}</em></td>
|
||||
<td>{$lng['admin']['phpconfig']['admin']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><em>{DOCUMENT_ROOT}</em></td>
|
||||
<td>{$lng['admin']['phpconfig']['docroot']}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
41
templates/Sparkle/admin/vhostconfig/overview.tpl
vendored
41
templates/Sparkle/admin/vhostconfig/overview.tpl
vendored
@@ -1,41 +0,0 @@
|
||||
$header
|
||||
<article>
|
||||
<header>
|
||||
<h2>
|
||||
<img src="templates/{$theme}/assets/img/icons/phpsettings_big.png" alt="" />
|
||||
{$lng['menue']['vhostsettings']['maintitle']}
|
||||
</h2>
|
||||
</header>
|
||||
|
||||
<section>
|
||||
|
||||
<div class="overviewadd">
|
||||
<img src="templates/{$theme}/assets/img/icons/add.png" alt="" />
|
||||
<a href="{$linker->getLink(array('section' => 'vhostsettings', 'page' => $page, 'action' => 'add'))}">{$lng['admin']['vhostsettings']['addnew']}</a>
|
||||
</div>
|
||||
|
||||
<table class="full hl">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{$lng['admin']['phpsettings']['description']}</th>
|
||||
<th>{$lng['admin']['phpsettings']['activedomains']}</th>
|
||||
<th>{$lng['admin']['webserver']}</th>
|
||||
<th>{$lng['panel']['options']}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
$tablecontent
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<if 15 < $count>
|
||||
<div class="overviewadd">
|
||||
<img src="templates/{$theme}/assets/img/icons/add.png" alt="" />
|
||||
<a href="{$linker->getLink(array('section' => 'vhostsettings', 'page' => $page, 'action' => 'add'))}">{$lng['admin']['vhostsettings']['addnew']}</a>
|
||||
</div>
|
||||
</if>
|
||||
|
||||
</section>
|
||||
|
||||
</article>
|
||||
$footer
|
||||
@@ -1,76 +0,0 @@
|
||||
$header
|
||||
<article>
|
||||
<header>
|
||||
<h2>
|
||||
<img src="templates/{$theme}/assets/img/icons/phpsettings_add_big.png" alt="{$title}" />
|
||||
{$title}
|
||||
</h2>
|
||||
</header>
|
||||
|
||||
<section>
|
||||
|
||||
<form action="{$linker->getLink(array('section' => 'vhostsettings'))}" method="post" enctype="application/x-www-form-urlencoded">
|
||||
<input type="hidden" name="s" value="$s" />
|
||||
<input type="hidden" name="page" value="$page" />
|
||||
<input type="hidden" name="action" value="$action" />
|
||||
<input type="hidden" name="send" value="send" />
|
||||
|
||||
<table class="full">
|
||||
{$vhostconfig_add_form}
|
||||
</table>
|
||||
</form>
|
||||
</section>
|
||||
</article>
|
||||
<br />
|
||||
<article>
|
||||
<header>
|
||||
<h3>
|
||||
{$lng['admin']['templates']['template_replace_vars']}
|
||||
</h3>
|
||||
</header>
|
||||
|
||||
<section>
|
||||
|
||||
<table class="full">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{$lng['panel']['variable']}</th>
|
||||
<th>{$lng['panel']['description']}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><em>{CUSTOMER}</em></td>
|
||||
<td>{$lng['admin']['phpconfig']['customer']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><em>{DOCROOT}</em></td>
|
||||
<td>{$lng['admin']['vhostconfig']['docroot']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><em>{DOMAIN}</em></td>
|
||||
<td>{$lng['admin']['phpconfig']['domain']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><em>{IP}</em></td>
|
||||
<td>{$lng['admin']['vhostconfig']['ip']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><em>{PORT}</em></td>
|
||||
<td>{$lng['admin']['vhostconfig']['port']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><em>{SCHEME}</em></td>
|
||||
<td>{$lng['admin']['vhostconfig']['scheme']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><em>{SOCKET}</em></td>
|
||||
<td>{$lng['admin']['vhostconfig']['socket_dir']}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</section>
|
||||
|
||||
</article>
|
||||
$footer
|
||||
@@ -1,77 +0,0 @@
|
||||
$header
|
||||
<article>
|
||||
<header>
|
||||
<h2>
|
||||
<img src="templates/{$theme}/assets/img/icons/phpsettings_edit_big.png" alt="{$title}" />
|
||||
{$title}
|
||||
</h2>
|
||||
</header>
|
||||
|
||||
<section>
|
||||
|
||||
<form action="{$linker->getLink(array('section' => 'vhostsettings'))}" method="post" enctype="application/x-www-form-urlencoded">
|
||||
<input type="hidden" name="s" value="$s"/>
|
||||
<input type="hidden" name="page" value="$page"/>
|
||||
<input type="hidden" name="action" value="edit"/>
|
||||
<input type="hidden" name="id" value="$id"/>
|
||||
<input type="hidden" name="send" value="send" />
|
||||
|
||||
<table class="full">
|
||||
{$vhostconfig_edit_form}
|
||||
</table>
|
||||
</form>
|
||||
</section>
|
||||
</article>
|
||||
<br />
|
||||
<article>
|
||||
<header>
|
||||
<h3>
|
||||
{$lng['admin']['templates']['template_replace_vars']}
|
||||
</h3>
|
||||
</header>
|
||||
|
||||
<section>
|
||||
|
||||
<table class="full">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{$lng['panel']['variable']}</th>
|
||||
<th>{$lng['panel']['description']}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><em>{CUSTOMER}</em></td>
|
||||
<td>{$lng['admin']['phpconfig']['customer']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><em>{DOCROOT}</em></td>
|
||||
<td>{$lng['admin']['vhostconfig']['docroot']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><em>{DOMAIN}</em></td>
|
||||
<td>{$lng['admin']['phpconfig']['domain']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><em>{IP}</em></td>
|
||||
<td>{$lng['admin']['vhostconfig']['ip']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><em>{PORT}</em></td>
|
||||
<td>{$lng['admin']['vhostconfig']['port']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><em>{SCHEME}</em></td>
|
||||
<td>{$lng['admin']['vhostconfig']['scheme']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><em>{SOCKET}</em></td>
|
||||
<td>{$lng['admin']['vhostconfig']['socket_dir']}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</section>
|
||||
|
||||
</article>
|
||||
$footer
|
||||
@@ -1,13 +0,0 @@
|
||||
<tr class="top">
|
||||
<td><strong>{$row['description']}</strong></td>
|
||||
<td>{$domains}</td>
|
||||
<td>{$webserver}</td>
|
||||
<td>
|
||||
<a href="{$linker->getLink(array('section' => 'vhostsettings', 'page' => $page, 'action' => 'edit', 'id' => $row['id']))}">
|
||||
<img src="templates/{$theme}/assets/img/icons/edit.png" alt="{$lng['panel']['edit']}" title="{$lng['panel']['edit']}" />
|
||||
</a>
|
||||
<a href="{$linker->getLink(array('section' => 'vhostsettings', 'page' => $page, 'action' => 'delete', 'id' => $row['id']))}">
|
||||
<img src="templates/{$theme}/assets/img/icons/delete.png" alt="{$lng['panel']['delete']}" title="{$lng['panel']['delete']}" />
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
20
templates/Sparkle/assets/css/main.css
vendored
20
templates/Sparkle/assets/css/main.css
vendored
@@ -1495,11 +1495,21 @@ fieldset.file {
|
||||
}
|
||||
|
||||
.domain-canceled {
|
||||
/* Color copied from .warningcontainer */
|
||||
background-color: #fffecc;
|
||||
/* Color copied from .warningcontainer */
|
||||
background-color: #fffecc;
|
||||
}
|
||||
|
||||
.domain-expired {
|
||||
/* Color copied from .errorcontainer */
|
||||
background-color: rgb(242, 222, 222);
|
||||
}
|
||||
/* Color copied from .errorcontainer */
|
||||
background-color: rgb(242, 222, 222);
|
||||
}
|
||||
|
||||
.domain-hostname {
|
||||
background-color: rgb(53, 106, 160);
|
||||
color: #ddd;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
table.hl tbody tr.domain-hostname:hover {
|
||||
background-color: rgb(64, 150, 238);
|
||||
}
|
||||
|
||||
4
templates/Sparkle/assets/js/main.js
vendored
4
templates/Sparkle/assets/js/main.js
vendored
@@ -70,7 +70,7 @@ $(document).ready(function() {
|
||||
var snheight = $('#sidenavigation').height();
|
||||
var mainheight = $('#maincontent').height();
|
||||
if (snheight > mainheight && !$('#newsfeed').length) {
|
||||
$('#maincontent').height(snheight);
|
||||
$('#maincontent').css("min-height", snheight);
|
||||
}
|
||||
// this is necessary for the special setting feature (ref #1010)
|
||||
$.getQueryVariable = function(key) {
|
||||
@@ -219,4 +219,4 @@ $(document).ready(function() {
|
||||
});
|
||||
|
||||
autosize($('textarea.shell'));
|
||||
});
|
||||
});
|
||||
|
||||
26
templates/Sparkle/customer/extras/backup.tpl
vendored
Normal file
26
templates/Sparkle/customer/extras/backup.tpl
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
$header
|
||||
<article>
|
||||
<header>
|
||||
<h2>
|
||||
<img src="templates/{$theme}/assets/img/icons/backup_big.png" alt="{$title}" />
|
||||
{$title}
|
||||
</h2>
|
||||
</header>
|
||||
|
||||
<section>
|
||||
|
||||
<form action="{$linker->getLink(array('section' => 'extras'))}" method="post" enctype="application/x-www-form-urlencoded">
|
||||
<input type="hidden" name="s" value="$s" />
|
||||
<input type="hidden" name="page" value="$page" />
|
||||
<input type="hidden" name="action" value="$action" />
|
||||
<input type="hidden" name="send" value="send" />
|
||||
|
||||
<table class="full">
|
||||
{$backup_form}
|
||||
</table>
|
||||
</form>
|
||||
|
||||
</section>
|
||||
|
||||
</article>
|
||||
$footer
|
||||
Reference in New Issue
Block a user