Compare commits
29 Commits
2.0.20
...
29a2ab7567
| Author | SHA1 | Date | |
|---|---|---|---|
| 29a2ab7567 | |||
|
|
166ec0575b | ||
|
|
215e749ba8 | ||
|
|
506cccd7c8 | ||
|
|
6d9014c29b | ||
|
|
10555bff76 | ||
|
|
37aa7af4da | ||
|
|
4b75369597 | ||
|
|
9d0e463906 | ||
|
|
a7198f58ce | ||
|
|
47be4b2847 | ||
|
|
b0fae4bd14 | ||
|
|
4711a41436 | ||
|
|
faa71ceaef | ||
|
|
2d30394150 | ||
|
|
99c1182af8 | ||
|
|
d9abe58dd2 | ||
|
|
23034b8ad2 | ||
|
|
1cae5638d3 | ||
|
|
ce9a5f97a3 | ||
|
|
c38b90deef | ||
|
|
13daa7d6fa | ||
|
|
b0e43d332d | ||
|
|
75c8754fb4 | ||
|
|
e0fa64f897 | ||
|
|
ed72fd1766 | ||
|
|
826ae36647 | ||
|
|
9ddf24539e | ||
|
|
3940c1429d |
41
.drone.yml
Normal file
41
.drone.yml
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
kind: pipeline
|
||||||
|
name: deploy-froxlor
|
||||||
|
type: docker
|
||||||
|
|
||||||
|
platform:
|
||||||
|
os: linux
|
||||||
|
arch: arm64
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
branch:
|
||||||
|
- upgrade-2.0
|
||||||
|
event:
|
||||||
|
include:
|
||||||
|
- push
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: deploy
|
||||||
|
image: cr.wks/drone/drone-rsync:latest
|
||||||
|
settings:
|
||||||
|
hosts: ["rechner02.maketank.net"]
|
||||||
|
source: ./
|
||||||
|
target: ~/froxlor-test
|
||||||
|
user: www-data
|
||||||
|
exclude: ['vendor', '.git*', '*drone.yml', '.settings', '.buildpath', '.editorconfig', '.project', '.travis.yml']
|
||||||
|
args: '-v --delete'
|
||||||
|
log_level: quiet
|
||||||
|
key:
|
||||||
|
from_secret: ssh-www-data-maketank-rsa
|
||||||
|
command_timeout: 10m
|
||||||
|
- name: compose-install
|
||||||
|
image: appleboy/drone-ssh
|
||||||
|
settings:
|
||||||
|
host:
|
||||||
|
- rechner02.maketank.net
|
||||||
|
username: www-data
|
||||||
|
key:
|
||||||
|
from_secret: ssh-www-data-maketank-rsa
|
||||||
|
script:
|
||||||
|
- cd ~/froxlor-test && composer install --no-dev
|
||||||
|
- cd ~/froxlor-test && npm install && npm run build
|
||||||
|
|
||||||
@@ -77,6 +77,7 @@ if (($page == 'admins' || $page == 'overview') && $userinfo['change_serversettin
|
|||||||
$result['switched_user'] = CurrentUser::getData();
|
$result['switched_user'] = CurrentUser::getData();
|
||||||
$result['adminsession'] = 1;
|
$result['adminsession'] = 1;
|
||||||
$result['userid'] = $result['adminid'];
|
$result['userid'] = $result['adminid'];
|
||||||
|
session_regenerate_id(true);
|
||||||
CurrentUser::setData($result);
|
CurrentUser::setData($result);
|
||||||
|
|
||||||
$log->logAction(
|
$log->logAction(
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ use Froxlor\Settings;
|
|||||||
use Froxlor\UI\Panel\UI;
|
use Froxlor\UI\Panel\UI;
|
||||||
use Froxlor\UI\Request;
|
use Froxlor\UI\Request;
|
||||||
use Froxlor\UI\Response;
|
use Froxlor\UI\Response;
|
||||||
|
use Froxlor\Validate\Validate;
|
||||||
|
|
||||||
if ($userinfo['change_serversettings'] == '1') {
|
if ($userinfo['change_serversettings'] == '1') {
|
||||||
if ($action == 'setconfigured') {
|
if ($action == 'setconfigured') {
|
||||||
@@ -91,6 +92,7 @@ if ($userinfo['change_serversettings'] == '1') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($distribution != "" && isset($_POST['finish'])) {
|
if ($distribution != "" && isset($_POST['finish'])) {
|
||||||
|
$valid_keys = ['http', 'dns', 'smtp', 'mail', 'ftp', 'system', 'distro'];
|
||||||
unset($_POST['finish']);
|
unset($_POST['finish']);
|
||||||
unset($_POST['csrf_token']);
|
unset($_POST['csrf_token']);
|
||||||
$params = $_POST;
|
$params = $_POST;
|
||||||
@@ -99,6 +101,20 @@ if ($userinfo['change_serversettings'] == '1') {
|
|||||||
foreach ($_POST['system'] as $sysdaemon) {
|
foreach ($_POST['system'] as $sysdaemon) {
|
||||||
$params['system'][] = $sysdaemon;
|
$params['system'][] = $sysdaemon;
|
||||||
}
|
}
|
||||||
|
// validate params
|
||||||
|
foreach ($params as $key => $value) {
|
||||||
|
if (!in_array($key, $valid_keys)) {
|
||||||
|
unset($params[$key]);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (!is_array($value)) {
|
||||||
|
$params[$key] = Validate::validate($value, $key);
|
||||||
|
} else {
|
||||||
|
foreach ($value as $subkey => $subvalue) {
|
||||||
|
$params[$key][$subkey] = Validate::validate($subvalue, $key.'.'.$subkey);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
$params_content = json_encode($params);
|
$params_content = json_encode($params);
|
||||||
$params_filename = FileDir::makeCorrectFile(Froxlor::getInstallDir() . 'install/' . Froxlor::genSessionId() . '.json');
|
$params_filename = FileDir::makeCorrectFile(Froxlor::getInstallDir() . 'install/' . Froxlor::genSessionId() . '.json');
|
||||||
file_put_contents($params_filename, $params_content);
|
file_put_contents($params_filename, $params_content);
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ if (($page == 'customers' || $page == 'overview') && $userinfo['customers'] != '
|
|||||||
$result['switched_user'] = CurrentUser::getData();
|
$result['switched_user'] = CurrentUser::getData();
|
||||||
$result['adminsession'] = 0;
|
$result['adminsession'] = 0;
|
||||||
$result['userid'] = $result['customerid'];
|
$result['userid'] = $result['customerid'];
|
||||||
|
session_regenerate_id(true);
|
||||||
CurrentUser::setData($result);
|
CurrentUser::setData($result);
|
||||||
|
|
||||||
$log->logAction(FroxlorLogger::ADM_ACTION, LOG_INFO, "switched user and is now '" . $destination_user . "'");
|
$log->logAction(FroxlorLogger::ADM_ACTION, LOG_INFO, "switched user and is now '" . $destination_user . "'");
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ if ($action == 'logout') {
|
|||||||
if (is_array(CurrentUser::getField('switched_user'))) {
|
if (is_array(CurrentUser::getField('switched_user'))) {
|
||||||
$result = CurrentUser::getData();
|
$result = CurrentUser::getData();
|
||||||
$result = $result['switched_user'];
|
$result = $result['switched_user'];
|
||||||
|
session_regenerate_id(true);
|
||||||
CurrentUser::setData($result);
|
CurrentUser::setData($result);
|
||||||
$target = (isset($_GET['target']) ? $_GET['target'] : 'index');
|
$target = (isset($_GET['target']) ? $_GET['target'] : 'index');
|
||||||
$redirect = "admin_" . $target . ".php";
|
$redirect = "admin_" . $target . ".php";
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
use Froxlor\Cli\ConfigDiff;
|
||||||
use Symfony\Component\Console\Application;
|
use Symfony\Component\Console\Application;
|
||||||
use Froxlor\Cli\RunApiCommand;
|
use Froxlor\Cli\RunApiCommand;
|
||||||
use Froxlor\Cli\ConfigServices;
|
use Froxlor\Cli\ConfigServices;
|
||||||
@@ -61,4 +62,5 @@ $application->add(new InstallCommand());
|
|||||||
$application->add(new MasterCron());
|
$application->add(new MasterCron());
|
||||||
$application->add(new UserCommand());
|
$application->add(new UserCommand());
|
||||||
$application->add(new ValidateAcmeWebroot());
|
$application->add(new ValidateAcmeWebroot());
|
||||||
|
$application->add(new ConfigDiff());
|
||||||
$application->run();
|
$application->run();
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ if ($action == 'logout') {
|
|||||||
if (is_array(CurrentUser::getField('switched_user'))) {
|
if (is_array(CurrentUser::getField('switched_user'))) {
|
||||||
$result = CurrentUser::getData();
|
$result = CurrentUser::getData();
|
||||||
$result = $result['switched_user'];
|
$result = $result['switched_user'];
|
||||||
|
session_regenerate_id(true);
|
||||||
CurrentUser::setData($result);
|
CurrentUser::setData($result);
|
||||||
$target = (isset($_GET['target']) ? $_GET['target'] : 'index');
|
$target = (isset($_GET['target']) ? $_GET['target'] : 'index');
|
||||||
$redirect = "admin_" . $target . ".php";
|
$redirect = "admin_" . $target . ".php";
|
||||||
|
|||||||
40
index.php
40
index.php
@@ -40,7 +40,6 @@ use Froxlor\UI\Panel\UI;
|
|||||||
use Froxlor\UI\Response;
|
use Froxlor\UI\Response;
|
||||||
use Froxlor\User;
|
use Froxlor\User;
|
||||||
use Froxlor\Validate\Validate;
|
use Froxlor\Validate\Validate;
|
||||||
use Froxlor\Language;
|
|
||||||
|
|
||||||
if ($action == '') {
|
if ($action == '') {
|
||||||
$action = 'login';
|
$action = 'login';
|
||||||
@@ -161,7 +160,7 @@ if ($action == '2fa_entercode') {
|
|||||||
]);
|
]);
|
||||||
exit();
|
exit();
|
||||||
} elseif ($action == 'login') {
|
} elseif ($action == 'login') {
|
||||||
if (isset($_POST['send']) && $_POST['send'] == 'send') {
|
if (!empty($_POST)) {
|
||||||
$loginname = Validate::validate($_POST['loginname'], 'loginname');
|
$loginname = Validate::validate($_POST['loginname'], 'loginname');
|
||||||
$password = Validate::validate($_POST['password'], 'password');
|
$password = Validate::validate($_POST['password'], 'password');
|
||||||
|
|
||||||
@@ -431,13 +430,18 @@ if ($action == '2fa_entercode') {
|
|||||||
}
|
}
|
||||||
$lastqrystr = "";
|
$lastqrystr = "";
|
||||||
if (isset($_REQUEST['qrystr']) && $_REQUEST['qrystr'] != "") {
|
if (isset($_REQUEST['qrystr']) && $_REQUEST['qrystr'] != "") {
|
||||||
$lastqrystr = htmlspecialchars($_REQUEST['qrystr'], ENT_QUOTES);
|
$lastqrystr = urlencode($_REQUEST['qrystr']);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($lastscript)) {
|
||||||
|
$_SESSION['lastscript'] = $lastscript;
|
||||||
|
}
|
||||||
|
if (!empty($lastqrystr)) {
|
||||||
|
$_SESSION['lastqrystr'] = $lastqrystr;
|
||||||
}
|
}
|
||||||
|
|
||||||
UI::view('login/login.html.twig', [
|
UI::view('login/login.html.twig', [
|
||||||
'pagetitle' => 'Login',
|
'pagetitle' => 'Login',
|
||||||
'lastscript' => $lastscript,
|
|
||||||
'lastqrystr' => $lastqrystr,
|
|
||||||
'upd_in_progress' => $update_in_progress,
|
'upd_in_progress' => $update_in_progress,
|
||||||
'message' => $message,
|
'message' => $message,
|
||||||
'successmsg' => $successmessage
|
'successmsg' => $successmessage
|
||||||
@@ -449,7 +453,7 @@ if ($action == 'forgotpwd') {
|
|||||||
$adminchecked = false;
|
$adminchecked = false;
|
||||||
$message = '';
|
$message = '';
|
||||||
|
|
||||||
if (isset($_POST['send']) && $_POST['send'] == 'send') {
|
if (!empty($_POST)) {
|
||||||
$loginname = Validate::validate($_POST['loginname'], 'loginname');
|
$loginname = Validate::validate($_POST['loginname'], 'loginname');
|
||||||
$email = Validate::validateEmail($_POST['loginemail']);
|
$email = Validate::validateEmail($_POST['loginemail']);
|
||||||
$result_stmt = Database::prepare("SELECT `adminid`, `customerid`, `customernumber`, `firstname`, `name`, `company`, `email`, `loginname`, `def_language`, `deactivated` FROM `" . TABLE_PANEL_CUSTOMERS . "`
|
$result_stmt = Database::prepare("SELECT `adminid`, `customerid`, `customernumber`, `firstname`, `name`, `company`, `email`, `loginname`, `def_language`, `deactivated` FROM `" . TABLE_PANEL_CUSTOMERS . "`
|
||||||
@@ -633,7 +637,7 @@ if ($action == 'forgotpwd') {
|
|||||||
|
|
||||||
UI::view('login/fpwd.html.twig', [
|
UI::view('login/fpwd.html.twig', [
|
||||||
'pagetitle' => lng('login.presend'),
|
'pagetitle' => lng('login.presend'),
|
||||||
'action' => $action,
|
'formaction' => 'index.php?action=' . $action,
|
||||||
'message' => $message,
|
'message' => $message,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@@ -656,7 +660,7 @@ if ($action == 'resetpwd') {
|
|||||||
$check = substr($activationcode, 40, 10);
|
$check = substr($activationcode, 40, 10);
|
||||||
|
|
||||||
if (substr(md5($third . $timestamp), 0, 10) == $check && $timestamp >= time() - 86400) {
|
if (substr(md5($third . $timestamp), 0, 10) == $check && $timestamp >= time() - 86400) {
|
||||||
if (isset($_POST['send']) && $_POST['send'] == 'send') {
|
if (!empty($_POST)) {
|
||||||
$stmt = Database::prepare("SELECT `userid`, `admin` FROM `" . TABLE_PANEL_ACTIVATION . "`
|
$stmt = Database::prepare("SELECT `userid`, `admin` FROM `" . TABLE_PANEL_ACTIVATION . "`
|
||||||
WHERE `activationcode` = :activationcode");
|
WHERE `activationcode` = :activationcode");
|
||||||
$result = Database::pexecute_first($stmt, [
|
$result = Database::pexecute_first($stmt, [
|
||||||
@@ -733,6 +737,7 @@ if ($action == 'resetpwd') {
|
|||||||
function finishLogin($userinfo)
|
function finishLogin($userinfo)
|
||||||
{
|
{
|
||||||
if (isset($userinfo['userid']) && $userinfo['userid'] != '') {
|
if (isset($userinfo['userid']) && $userinfo['userid'] != '') {
|
||||||
|
session_regenerate_id(true);
|
||||||
CurrentUser::setData($userinfo);
|
CurrentUser::setData($userinfo);
|
||||||
|
|
||||||
$language = $userinfo['def_language'] ?? Settings::Get('panel.standardlanguage');
|
$language = $userinfo['def_language'] ?? Settings::Get('panel.standardlanguage');
|
||||||
@@ -746,29 +751,34 @@ function finishLogin($userinfo)
|
|||||||
}
|
}
|
||||||
|
|
||||||
$qryparams = [];
|
$qryparams = [];
|
||||||
if (isset($_POST['qrystr']) && $_POST['qrystr'] != "") {
|
if (!empty($_SESSION['lastqrystr'])) {
|
||||||
parse_str(urldecode($_POST['qrystr']), $qryparams);
|
parse_str(urldecode($_SESSION['lastqrystr']), $qryparams);
|
||||||
|
unset($_SESSION['lastqrystr']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($userinfo['adminsession'] == '1') {
|
if ($userinfo['adminsession'] == '1') {
|
||||||
if (Froxlor::hasUpdates() || Froxlor::hasDbUpdates()) {
|
if (Froxlor::hasUpdates() || Froxlor::hasDbUpdates()) {
|
||||||
Response::redirectTo('admin_updates.php?page=overview');
|
Response::redirectTo('admin_updates.php?page=overview');
|
||||||
} else {
|
} else {
|
||||||
if (isset($_POST['script']) && $_POST['script'] != "") {
|
if (!empty($_SESSION['lastscript'])) {
|
||||||
if (preg_match("/customer\_/", $_POST['script']) === 1) {
|
$lastscript = $_SESSION['lastscript'];
|
||||||
|
unset($_SESSION['lastscript']);
|
||||||
|
if (preg_match("/customer\_/", $lastscript) === 1) {
|
||||||
Response::redirectTo('admin_customers.php', [
|
Response::redirectTo('admin_customers.php', [
|
||||||
"page" => "customers"
|
"page" => "customers"
|
||||||
]);
|
]);
|
||||||
} else {
|
} else {
|
||||||
Response::redirectTo($_POST['script'], $qryparams);
|
Response::redirectTo($lastscript, $qryparams);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Response::redirectTo('admin_index.php', $qryparams);
|
Response::redirectTo('admin_index.php', $qryparams);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (isset($_POST['script']) && $_POST['script'] != "") {
|
if (!empty($_SESSION['lastscript'])) {
|
||||||
Response::redirectTo($_POST['script'], $qryparams);
|
$lastscript = $_SESSION['lastscript'];
|
||||||
|
unset($_SESSION['lastscript']);
|
||||||
|
Response::redirectTo($lastscript, $qryparams);
|
||||||
} else {
|
} else {
|
||||||
Response::redirectTo('customer_index.php', $qryparams);
|
Response::redirectTo('customer_index.php', $qryparams);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -697,7 +697,7 @@ opcache.validate_timestamps'),
|
|||||||
('system', 'distribution', ''),
|
('system', 'distribution', ''),
|
||||||
('system', 'update_channel', 'stable'),
|
('system', 'update_channel', 'stable'),
|
||||||
('system', 'updatecheck_data', ''),
|
('system', 'updatecheck_data', ''),
|
||||||
('system', 'update_notify_last', '2.0.20'),
|
('system', 'update_notify_last', '2.0.24'),
|
||||||
('system', 'traffictool', 'goaccess'),
|
('system', 'traffictool', 'goaccess'),
|
||||||
('system', 'req_limit_per_interval', 60),
|
('system', 'req_limit_per_interval', 60),
|
||||||
('system', 'req_limit_interval', 60),
|
('system', 'req_limit_interval', 60),
|
||||||
@@ -744,7 +744,7 @@ opcache.validate_timestamps'),
|
|||||||
('panel', 'logo_overridetheme', '0'),
|
('panel', 'logo_overridetheme', '0'),
|
||||||
('panel', 'logo_overridecustom', '0'),
|
('panel', 'logo_overridecustom', '0'),
|
||||||
('panel', 'settings_mode', '0'),
|
('panel', 'settings_mode', '0'),
|
||||||
('panel', 'version', '2.0.20'),
|
('panel', 'version', '2.0.24'),
|
||||||
('panel', 'db_version', '202304260');
|
('panel', 'db_version', '202304260');
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ if (Froxlor::isFroxlorVersion('0.10.38.3')) {
|
|||||||
Update::showUpdateStep("Adding new settings");
|
Update::showUpdateStep("Adding new settings");
|
||||||
$panel_settings_mode = isset($_POST['panel_settings_mode']) ? (int)$_POST['panel_settings_mode'] : 0;
|
$panel_settings_mode = isset($_POST['panel_settings_mode']) ? (int)$_POST['panel_settings_mode'] : 0;
|
||||||
Settings::AddNew("panel.settings_mode", $panel_settings_mode);
|
Settings::AddNew("panel.settings_mode", $panel_settings_mode);
|
||||||
$system_distribution = isset($_POST['system_distribution']) ? $_POST['system_distribution'] : '';
|
$system_distribution = isset($_POST['system_distribution']) ? $_POST['system_distribution'] : 'bullseye';
|
||||||
Settings::AddNew("system.distribution", $system_distribution);
|
Settings::AddNew("system.distribution", $system_distribution);
|
||||||
Settings::AddNew("system.update_channel", 'stable');
|
Settings::AddNew("system.update_channel", 'stable');
|
||||||
Settings::AddNew("system.updatecheck_data", '');
|
Settings::AddNew("system.updatecheck_data", '');
|
||||||
@@ -497,3 +497,23 @@ if (Froxlor::isFroxlorVersion('2.0.19')) {
|
|||||||
Update::showUpdateStep("Updating from 2.0.19 to 2.0.20", false);
|
Update::showUpdateStep("Updating from 2.0.19 to 2.0.20", false);
|
||||||
Froxlor::updateToVersion('2.0.20');
|
Froxlor::updateToVersion('2.0.20');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Froxlor::isFroxlorVersion('2.0.20')) {
|
||||||
|
Update::showUpdateStep("Updating from 2.0.20 to 2.0.21", false);
|
||||||
|
Froxlor::updateToVersion('2.0.21');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Froxlor::isFroxlorVersion('2.0.21')) {
|
||||||
|
Update::showUpdateStep("Updating from 2.0.21 to 2.0.22", false);
|
||||||
|
Froxlor::updateToVersion('2.0.22');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Froxlor::isFroxlorVersion('2.0.22')) {
|
||||||
|
Update::showUpdateStep("Updating from 2.0.22 to 2.0.23", false);
|
||||||
|
Froxlor::updateToVersion('2.0.23');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Froxlor::isFroxlorVersion('2.0.23')) {
|
||||||
|
Update::showUpdateStep("Updating from 2.0.23 to 2.0.24", false);
|
||||||
|
Froxlor::updateToVersion('2.0.24');
|
||||||
|
}
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ if (Update::versionInUpdate($current_version, '2.0.0-beta1')) {
|
|||||||
$config_dir = FileDir::makeCorrectDir(Froxlor::getInstallDir() . '/lib/configfiles/');
|
$config_dir = FileDir::makeCorrectDir(Froxlor::getInstallDir() . '/lib/configfiles/');
|
||||||
// show list of available distro's
|
// show list of available distro's
|
||||||
$distros = glob($config_dir . '*.xml');
|
$distros = glob($config_dir . '*.xml');
|
||||||
$distributions_select[''] = '-';
|
// selection is required $distributions_select[''] = '-';
|
||||||
// read in all the distros
|
// read in all the distros
|
||||||
foreach ($distros as $_distribution) {
|
foreach ($distros as $_distribution) {
|
||||||
// get configparser object
|
// get configparser object
|
||||||
|
|||||||
@@ -39,12 +39,12 @@ abstract class ApiParameter
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param array $params
|
* @param array|null $params
|
||||||
* optional, array of parameters (var=>value) for the command
|
* optional, array of parameters (var=>value) for the command
|
||||||
*
|
*
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function __construct($params = null)
|
public function __construct(array $params = null)
|
||||||
{
|
{
|
||||||
if (!is_null($params)) {
|
if (!is_null($params)) {
|
||||||
$params = $this->trimArray($params);
|
$params = $this->trimArray($params);
|
||||||
@@ -57,7 +57,7 @@ abstract class ApiParameter
|
|||||||
*
|
*
|
||||||
* @param array $input
|
* @param array $input
|
||||||
*
|
*
|
||||||
* @return array
|
* @return string|array
|
||||||
*/
|
*/
|
||||||
private function trimArray($input)
|
private function trimArray($input)
|
||||||
{
|
{
|
||||||
@@ -79,9 +79,9 @@ abstract class ApiParameter
|
|||||||
/**
|
/**
|
||||||
* get specific parameter which also has and unlimited-field
|
* get specific parameter which also has and unlimited-field
|
||||||
*
|
*
|
||||||
* @param string $param
|
* @param string|null $param
|
||||||
* parameter to get out of the request-parameter list
|
* parameter to get out of the request-parameter list
|
||||||
* @param string $ul_field
|
* @param string|null $ul_field
|
||||||
* parameter to get out of the request-parameter list
|
* parameter to get out of the request-parameter list
|
||||||
* @param bool $optional
|
* @param bool $optional
|
||||||
* default: false
|
* default: false
|
||||||
@@ -91,7 +91,7 @@ abstract class ApiParameter
|
|||||||
* @return mixed
|
* @return mixed
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
protected function getUlParam($param = null, $ul_field = null, $optional = false, $default = 0)
|
protected function getUlParam(string $param = null, string $ul_field = null, bool $optional = false, $default = 0)
|
||||||
{
|
{
|
||||||
$param_value = (int)$this->getParam($param, $optional, $default);
|
$param_value = (int)$this->getParam($param, $optional, $default);
|
||||||
$ul_field_value = $this->getBoolParam($ul_field, true, 0);
|
$ul_field_value = $this->getBoolParam($ul_field, true, 0);
|
||||||
@@ -102,11 +102,11 @@ abstract class ApiParameter
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get specific parameter from the parameterlist;
|
* get specific parameter from the parameter list;
|
||||||
* check for existence and != empty if needed.
|
* check for existence and != empty if needed.
|
||||||
* Maybe more in the future
|
* Maybe more in the future
|
||||||
*
|
*
|
||||||
* @param string $param
|
* @param string|null $param
|
||||||
* parameter to get out of the request-parameter list
|
* parameter to get out of the request-parameter list
|
||||||
* @param bool $optional
|
* @param bool $optional
|
||||||
* default: false
|
* default: false
|
||||||
@@ -116,7 +116,7 @@ abstract class ApiParameter
|
|||||||
* @return mixed
|
* @return mixed
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
protected function getParam($param = null, $optional = false, $default = '')
|
protected function getParam(string $param = null, bool $optional = false, $default = '')
|
||||||
{
|
{
|
||||||
// does it exist?
|
// does it exist?
|
||||||
if (!isset($this->cmd_params[$param])) {
|
if (!isset($this->cmd_params[$param])) {
|
||||||
@@ -128,7 +128,7 @@ abstract class ApiParameter
|
|||||||
return $default;
|
return $default;
|
||||||
}
|
}
|
||||||
// is it empty? - test really on string, as value 0 is being seen as empty by php
|
// is it empty? - test really on string, as value 0 is being seen as empty by php
|
||||||
if ($this->cmd_params[$param] === "") {
|
if (!is_array($this->cmd_params[$param]) && trim($this->cmd_params[$param]) === "") {
|
||||||
if ($optional === false) {
|
if ($optional === false) {
|
||||||
// get module + function for better error-messages
|
// get module + function for better error-messages
|
||||||
$inmod = $this->getModFunctionString();
|
$inmod = $this->getModFunctionString();
|
||||||
@@ -142,7 +142,7 @@ abstract class ApiParameter
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* returns "module::function()" for better error-messages (missing parameter etc.)
|
* returns "module::function()" for better error-messages (missing parameter etc.)
|
||||||
* makes debugging a whole lot more comfortable
|
* makes debugging a lot more comfortable
|
||||||
*
|
*
|
||||||
* @param int $level
|
* @param int $level
|
||||||
* depth of backtrace, default 2
|
* depth of backtrace, default 2
|
||||||
@@ -152,7 +152,7 @@ abstract class ApiParameter
|
|||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
private function getModFunctionString($level = 1, $max_level = 5, $trace = null)
|
private function getModFunctionString(int $level = 1, int $max_level = 5, $trace = null)
|
||||||
{
|
{
|
||||||
// which class called us
|
// which class called us
|
||||||
$_class = get_called_class();
|
$_class = get_called_class();
|
||||||
@@ -174,7 +174,7 @@ abstract class ApiParameter
|
|||||||
/**
|
/**
|
||||||
* getParam wrapper for boolean parameter
|
* getParam wrapper for boolean parameter
|
||||||
*
|
*
|
||||||
* @param string $param
|
* @param string|null $param
|
||||||
* parameter to get out of the request-parameter list
|
* parameter to get out of the request-parameter list
|
||||||
* @param bool $optional
|
* @param bool $optional
|
||||||
* default: false
|
* default: false
|
||||||
@@ -183,7 +183,7 @@ abstract class ApiParameter
|
|||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
protected function getBoolParam($param = null, $optional = false, $default = false)
|
protected function getBoolParam(string $param = null, bool $optional = false, $default = false)
|
||||||
{
|
{
|
||||||
$_default = '0';
|
$_default = '0';
|
||||||
if ($default) {
|
if ($default) {
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ class Admins extends ApiCommand implements ResourceEntity
|
|||||||
public function listing()
|
public function listing()
|
||||||
{
|
{
|
||||||
if ($this->isAdmin() && $this->getUserDetail('change_serversettings') == 1) {
|
if ($this->isAdmin() && $this->getUserDetail('change_serversettings') == 1) {
|
||||||
$this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_NOTICE, "[API] list admins");
|
$this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_INFO, "[API] list admins");
|
||||||
$query_fields = [];
|
$query_fields = [];
|
||||||
$result_stmt = Database::prepare("
|
$result_stmt = Database::prepare("
|
||||||
SELECT *
|
SELECT *
|
||||||
@@ -407,7 +407,7 @@ class Admins extends ApiCommand implements ResourceEntity
|
|||||||
];
|
];
|
||||||
$result = Database::pexecute_first($result_stmt, $params, true, true);
|
$result = Database::pexecute_first($result_stmt, $params, true, true);
|
||||||
if ($result) {
|
if ($result) {
|
||||||
$this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_NOTICE, "[API] get admin '" . $result['loginname'] . "'");
|
$this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_INFO, "[API] get admin '" . $result['loginname'] . "'");
|
||||||
return $this->response($result);
|
return $this->response($result);
|
||||||
}
|
}
|
||||||
$key = ($id > 0 ? "id #" . $id : "loginname '" . $loginname . "'");
|
$key = ($id > 0 ? "id #" . $id : "loginname '" . $loginname . "'");
|
||||||
@@ -584,6 +584,18 @@ class Admins extends ApiCommand implements ResourceEntity
|
|||||||
$theme = Settings::Get('panel.default_theme');
|
$theme = Settings::Get('panel.default_theme');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (empty(trim($name))) {
|
||||||
|
Response::standardError([
|
||||||
|
'stringisempty',
|
||||||
|
'admin.name'
|
||||||
|
], '', true);
|
||||||
|
}
|
||||||
|
if (empty(trim($email))) {
|
||||||
|
Response::standardError([
|
||||||
|
'stringisempty',
|
||||||
|
'admin.email'
|
||||||
|
], '', true);
|
||||||
|
}
|
||||||
if (!Validate::validateEmail($email)) {
|
if (!Validate::validateEmail($email)) {
|
||||||
Response::standardError('emailiswrong', $email, true);
|
Response::standardError('emailiswrong', $email, true);
|
||||||
} else {
|
} else {
|
||||||
@@ -705,7 +717,7 @@ class Admins extends ApiCommand implements ResourceEntity
|
|||||||
WHERE `adminid` = :adminid
|
WHERE `adminid` = :adminid
|
||||||
");
|
");
|
||||||
Database::pexecute($upd_stmt, $upd_data, true, true);
|
Database::pexecute($upd_stmt, $upd_data, true, true);
|
||||||
$this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_INFO, "[API] edited admin '" . $result['loginname'] . "'");
|
$this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_NOTICE, "[API] edited admin '" . $result['loginname'] . "'");
|
||||||
|
|
||||||
// get all admin-data for return-array
|
// get all admin-data for return-array
|
||||||
$result = $this->apiCall('Admins.get', [
|
$result = $this->apiCall('Admins.get', [
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ class Certificates extends ApiCommand implements ResourceEntity
|
|||||||
}
|
}
|
||||||
if (!$has_cert) {
|
if (!$has_cert) {
|
||||||
$this->addOrUpdateCertificate($domain['id'], $ssl_cert_file, $ssl_key_file, $ssl_ca_file, $ssl_cert_chainfile, true);
|
$this->addOrUpdateCertificate($domain['id'], $ssl_cert_file, $ssl_key_file, $ssl_ca_file, $ssl_cert_chainfile, true);
|
||||||
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_INFO, "[API] added ssl-certificate for '" . $domain['domain'] . "'");
|
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_NOTICE, "[API] added ssl-certificate for '" . $domain['domain'] . "'");
|
||||||
$result = $this->apiCall('Certificates.get', [
|
$result = $this->apiCall('Certificates.get', [
|
||||||
'id' => $domain['id']
|
'id' => $domain['id']
|
||||||
]);
|
]);
|
||||||
@@ -248,7 +248,7 @@ class Certificates extends ApiCommand implements ResourceEntity
|
|||||||
$ssl_ca_file = $this->getParam('ssl_ca_file', true, '');
|
$ssl_ca_file = $this->getParam('ssl_ca_file', true, '');
|
||||||
$ssl_cert_chainfile = $this->getParam('ssl_cert_chainfile', true, '');
|
$ssl_cert_chainfile = $this->getParam('ssl_cert_chainfile', true, '');
|
||||||
$this->addOrUpdateCertificate($domain['id'], $ssl_cert_file, $ssl_key_file, $ssl_ca_file, $ssl_cert_chainfile, false);
|
$this->addOrUpdateCertificate($domain['id'], $ssl_cert_file, $ssl_key_file, $ssl_ca_file, $ssl_cert_chainfile, false);
|
||||||
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_INFO, "[API] updated ssl-certificate for '" . $domain['domain'] . "'");
|
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_NOTICE, "[API] updated ssl-certificate for '" . $domain['domain'] . "'");
|
||||||
$result = $this->apiCall('Certificates.get', [
|
$result = $this->apiCall('Certificates.get', [
|
||||||
'id' => $domain['id']
|
'id' => $domain['id']
|
||||||
]);
|
]);
|
||||||
@@ -470,7 +470,7 @@ class Certificates extends ApiCommand implements ResourceEntity
|
|||||||
if ($chk['letsencrypt'] == '1') {
|
if ($chk['letsencrypt'] == '1') {
|
||||||
Cronjob::inserttask(TaskId::DELETE_DOMAIN_SSL, $chk['domain']);
|
Cronjob::inserttask(TaskId::DELETE_DOMAIN_SSL, $chk['domain']);
|
||||||
}
|
}
|
||||||
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_INFO, "[API] removed ssl-certificate for '" . $chk['domain'] . "'");
|
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_NOTICE, "[API] removed ssl-certificate for '" . $chk['domain'] . "'");
|
||||||
return $this->response($result);
|
return $this->response($result);
|
||||||
}
|
}
|
||||||
throw new Exception("Unable to determine SSL certificate. Maybe no access?", 406);
|
throw new Exception("Unable to determine SSL certificate. Maybe no access?", 406);
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ class Cronjobs extends ApiCommand implements ResourceEntity
|
|||||||
|
|
||||||
// insert task to re-generate the cron.d-file
|
// insert task to re-generate the cron.d-file
|
||||||
Cronjob::inserttask(TaskId::REBUILD_CRON);
|
Cronjob::inserttask(TaskId::REBUILD_CRON);
|
||||||
$this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_INFO, "[API] cronjob with description '" . $result['module'] . '/' . $result['cronfile'] . "' has been updated by '" . $this->getUserDetail('loginname') . "'");
|
$this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_NOTICE, "[API] cronjob with description '" . $result['module'] . '/' . $result['cronfile'] . "' has been updated by '" . $this->getUserDetail('loginname') . "'");
|
||||||
$result = $this->apiCall('Cronjobs.get', [
|
$result = $this->apiCall('Cronjobs.get', [
|
||||||
'id' => $id
|
'id' => $id
|
||||||
]);
|
]);
|
||||||
@@ -177,7 +177,7 @@ class Cronjobs extends ApiCommand implements ResourceEntity
|
|||||||
public function listing()
|
public function listing()
|
||||||
{
|
{
|
||||||
if ($this->isAdmin()) {
|
if ($this->isAdmin()) {
|
||||||
$this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_NOTICE, "[API] list cronjobs");
|
$this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_INFO, "[API] list cronjobs");
|
||||||
$query_fields = [];
|
$query_fields = [];
|
||||||
$result_stmt = Database::prepare("
|
$result_stmt = Database::prepare("
|
||||||
SELECT `c`.* FROM `" . TABLE_PANEL_CRONRUNS . "` `c` " . $this->getSearchWhere($query_fields) . $this->getOrderBy() . $this->getLimit());
|
SELECT `c`.* FROM `" . TABLE_PANEL_CRONRUNS . "` `c` " . $this->getSearchWhere($query_fields) . $this->getOrderBy() . $this->getLimit());
|
||||||
|
|||||||
@@ -194,7 +194,7 @@ class CustomerBackups extends ApiCommand implements ResourceEntity
|
|||||||
$result[] = $entry;
|
$result[] = $entry;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_NOTICE, "[API] list customer-backups");
|
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_INFO, "[API] list customer-backups");
|
||||||
return $this->response([
|
return $this->response([
|
||||||
'count' => count($result),
|
'count' => count($result),
|
||||||
'list' => $result
|
'list' => $result
|
||||||
|
|||||||
@@ -895,7 +895,7 @@ class Customers extends ApiCommand implements ResourceEntity
|
|||||||
$result['dbspace_used'] = 0;
|
$result['dbspace_used'] = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_NOTICE, "[API] get customer '" . $result['loginname'] . "'");
|
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_INFO, "[API] get customer '" . $result['loginname'] . "'");
|
||||||
return $this->response($result);
|
return $this->response($result);
|
||||||
}
|
}
|
||||||
$key = ($id > 0 ? "id #" . $id : "loginname '" . $loginname . "'");
|
$key = ($id > 0 ? "id #" . $id : "loginname '" . $loginname . "'");
|
||||||
@@ -1327,7 +1327,7 @@ class Customers extends ApiCommand implements ResourceEntity
|
|||||||
'vu' => $valid_until
|
'vu' => $valid_until
|
||||||
], true, true);
|
], true, true);
|
||||||
|
|
||||||
$this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_INFO, "[API] " . ($deactivated ? 'deactivated' : 'reactivated') . " user '" . $result['loginname'] . "'");
|
$this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_NOTICE, "[API] " . ($deactivated ? 'deactivated' : 'reactivated') . " user '" . $result['loginname'] . "'");
|
||||||
Cronjob::inserttask(TaskId::REBUILD_VHOST);
|
Cronjob::inserttask(TaskId::REBUILD_VHOST);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1538,7 +1538,7 @@ class Customers extends ApiCommand implements ResourceEntity
|
|||||||
Database::query($admin_update_query);
|
Database::query($admin_update_query);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_INFO, "[API] edited user '" . $result['loginname'] . "'");
|
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_NOTICE, "[API] edited user '" . $result['loginname'] . "'");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* move customer to another admin/reseller; #1166
|
* move customer to another admin/reseller; #1166
|
||||||
@@ -1911,7 +1911,7 @@ class Customers extends ApiCommand implements ResourceEntity
|
|||||||
// now, recalculate the resource-usage for the old and the new admin
|
// now, recalculate the resource-usage for the old and the new admin
|
||||||
User::updateCounters(false);
|
User::updateCounters(false);
|
||||||
|
|
||||||
$this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_INFO, "[API] moved user '" . $c_result['loginname'] . "' from admin/reseller '" . $c_result['adminname'] . " to admin/reseller '" . $a_result['loginname'] . "'");
|
$this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_NOTICE, "[API] moved user '" . $c_result['loginname'] . "' from admin/reseller '" . $c_result['adminname'] . " to admin/reseller '" . $a_result['loginname'] . "'");
|
||||||
|
|
||||||
$result = $this->apiCall('Customers.get', [
|
$result = $this->apiCall('Customers.get', [
|
||||||
'id' => $c_result['customerid']
|
'id' => $c_result['customerid']
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ class DirOptions extends ApiCommand implements ResourceEntity
|
|||||||
];
|
];
|
||||||
Database::pexecute($stmt, $params, true, true);
|
Database::pexecute($stmt, $params, true, true);
|
||||||
$id = Database::lastInsertId();
|
$id = Database::lastInsertId();
|
||||||
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_INFO, "[API] added directory-option for '" . $userpath . "'");
|
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_NOTICE, "[API] added directory-option for '" . $userpath . "'");
|
||||||
Cronjob::inserttask(TaskId::REBUILD_VHOST);
|
Cronjob::inserttask(TaskId::REBUILD_VHOST);
|
||||||
|
|
||||||
$result = $this->apiCall('DirOptions.get', [
|
$result = $this->apiCall('DirOptions.get', [
|
||||||
@@ -247,7 +247,7 @@ class DirOptions extends ApiCommand implements ResourceEntity
|
|||||||
$params['id'] = $id;
|
$params['id'] = $id;
|
||||||
$result = Database::pexecute_first($result_stmt, $params, true, true);
|
$result = Database::pexecute_first($result_stmt, $params, true, true);
|
||||||
if ($result) {
|
if ($result) {
|
||||||
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_NOTICE, "[API] get directory options for '" . $result['path'] . "'");
|
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_INFO, "[API] get directory options for '" . $result['path'] . "'");
|
||||||
return $this->response($result);
|
return $this->response($result);
|
||||||
}
|
}
|
||||||
$key = "id #" . $id;
|
$key = "id #" . $id;
|
||||||
@@ -331,7 +331,7 @@ class DirOptions extends ApiCommand implements ResourceEntity
|
|||||||
"id" => $id
|
"id" => $id
|
||||||
];
|
];
|
||||||
Database::pexecute($stmt, $params, true, true);
|
Database::pexecute($stmt, $params, true, true);
|
||||||
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_INFO, "[API] edited directory options for '" . str_replace($customer['documentroot'], '/', $result['path']) . "'");
|
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_NOTICE, "[API] edited directory options for '" . str_replace($customer['documentroot'], '/', $result['path']) . "'");
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = $this->apiCall('DirOptions.get', [
|
$result = $this->apiCall('DirOptions.get', [
|
||||||
@@ -379,7 +379,7 @@ class DirOptions extends ApiCommand implements ResourceEntity
|
|||||||
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
|
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||||
$result[] = $row;
|
$result[] = $row;
|
||||||
}
|
}
|
||||||
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_NOTICE, "[API] list directory-options");
|
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_INFO, "[API] list directory-options");
|
||||||
return $this->response([
|
return $this->response([
|
||||||
'count' => count($result),
|
'count' => count($result),
|
||||||
'list' => $result
|
'list' => $result
|
||||||
@@ -478,7 +478,7 @@ class DirOptions extends ApiCommand implements ResourceEntity
|
|||||||
"customerid" => $customer_data['customerid'],
|
"customerid" => $customer_data['customerid'],
|
||||||
"id" => $id
|
"id" => $id
|
||||||
], true, true);
|
], true, true);
|
||||||
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_INFO, "[API] deleted directory-option for '" . str_replace($customer_data['documentroot'], '/', $result['path']) . "'");
|
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_NOTICE, "[API] deleted directory-option for '" . str_replace($customer_data['documentroot'], '/', $result['path']) . "'");
|
||||||
Cronjob::inserttask(TaskId::REBUILD_VHOST);
|
Cronjob::inserttask(TaskId::REBUILD_VHOST);
|
||||||
return $this->response($result);
|
return $this->response($result);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ class DirProtections extends ApiCommand implements ResourceEntity
|
|||||||
];
|
];
|
||||||
Database::pexecute($stmt, $params, true, true);
|
Database::pexecute($stmt, $params, true, true);
|
||||||
$id = Database::lastInsertId();
|
$id = Database::lastInsertId();
|
||||||
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_INFO, "[API] added directory-protection for '" . $username . " (" . $path . ")'");
|
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_NOTICE, "[API] added directory-protection for '" . $username . " (" . $path . ")'");
|
||||||
Cronjob::inserttask(TaskId::REBUILD_VHOST);
|
Cronjob::inserttask(TaskId::REBUILD_VHOST);
|
||||||
|
|
||||||
$result = $this->apiCall('DirProtections.get', [
|
$result = $this->apiCall('DirProtections.get', [
|
||||||
@@ -196,7 +196,7 @@ class DirProtections extends ApiCommand implements ResourceEntity
|
|||||||
$params['idun'] = ($id <= 0 ? $username : $id);
|
$params['idun'] = ($id <= 0 ? $username : $id);
|
||||||
$result = Database::pexecute_first($result_stmt, $params, true, true);
|
$result = Database::pexecute_first($result_stmt, $params, true, true);
|
||||||
if ($result) {
|
if ($result) {
|
||||||
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_NOTICE, "[API] get directory protection for '" . $result['path'] . "'");
|
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_INFO, "[API] get directory protection for '" . $result['path'] . "'");
|
||||||
return $this->response($result);
|
return $this->response($result);
|
||||||
}
|
}
|
||||||
$key = ($id > 0 ? "id #" . $id : "username '" . $username . "'");
|
$key = ($id > 0 ? "id #" . $id : "username '" . $username . "'");
|
||||||
@@ -279,7 +279,7 @@ class DirProtections extends ApiCommand implements ResourceEntity
|
|||||||
Cronjob::inserttask(TaskId::REBUILD_VHOST);
|
Cronjob::inserttask(TaskId::REBUILD_VHOST);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_INFO, "[API] updated directory-protection '" . $result['username'] . " (" . $result['path'] . ")'");
|
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_NOTICE, "[API] updated directory-protection '" . $result['username'] . " (" . $result['path'] . ")'");
|
||||||
$result = $this->apiCall('DirProtections.get', [
|
$result = $this->apiCall('DirProtections.get', [
|
||||||
'id' => $result['id']
|
'id' => $result['id']
|
||||||
]);
|
]);
|
||||||
@@ -325,7 +325,7 @@ class DirProtections extends ApiCommand implements ResourceEntity
|
|||||||
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
|
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||||
$result[] = $row;
|
$result[] = $row;
|
||||||
}
|
}
|
||||||
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_NOTICE, "[API] list directory-protections");
|
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_INFO, "[API] list directory-protections");
|
||||||
return $this->response([
|
return $this->response([
|
||||||
'count' => count($result),
|
'count' => count($result),
|
||||||
'list' => $result
|
'list' => $result
|
||||||
@@ -413,7 +413,7 @@ class DirProtections extends ApiCommand implements ResourceEntity
|
|||||||
"id" => $id
|
"id" => $id
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_INFO, "[API] deleted htpasswd for '" . $result['username'] . " (" . $result['path'] . ")'");
|
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_WARNING, "[API] deleted htpasswd for '" . $result['username'] . " (" . $result['path'] . ")'");
|
||||||
Cronjob::inserttask(TaskId::REBUILD_VHOST);
|
Cronjob::inserttask(TaskId::REBUILD_VHOST);
|
||||||
return $this->response($result);
|
return $this->response($result);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -413,7 +413,7 @@ class DomainZones extends ApiCommand implements ResourceEntity
|
|||||||
$zone = Dns::createDomainZone($id);
|
$zone = Dns::createDomainZone($id);
|
||||||
$zonefile = (string)$zone;
|
$zonefile = (string)$zone;
|
||||||
|
|
||||||
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_NOTICE, "[API] get dns-zone for '" . $result['domain'] . "'");
|
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_INFO, "[API] get dns-zone for '" . $result['domain'] . "'");
|
||||||
return $this->response(explode("\n", $zonefile));
|
return $this->response(explode("\n", $zonefile));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -898,7 +898,7 @@ class Domains extends ApiCommand implements ResourceEntity
|
|||||||
$result['ipsandports'] = $this->getIpsForDomain($result['id']);
|
$result['ipsandports'] = $this->getIpsForDomain($result['id']);
|
||||||
}
|
}
|
||||||
$result['domain_hascert'] = $this->getHasCertValueForDomain((int)$result['id'], (int)$result['parentdomainid']);
|
$result['domain_hascert'] = $this->getHasCertValueForDomain((int)$result['id'], (int)$result['parentdomainid']);
|
||||||
$this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_NOTICE, "[API] get domain '" . $result['domain'] . "'");
|
$this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_INFO, "[API] get domain '" . $result['domain'] . "'");
|
||||||
return $this->response($result);
|
return $this->response($result);
|
||||||
}
|
}
|
||||||
$key = ($id > 0 ? "id #" . $id : "domainname '" . $domainname . "'");
|
$key = ($id > 0 ? "id #" . $id : "domainname '" . $domainname . "'");
|
||||||
@@ -1801,7 +1801,7 @@ class Domains extends ApiCommand implements ResourceEntity
|
|||||||
Database::pexecute($upd_stmt, [
|
Database::pexecute($upd_stmt, [
|
||||||
'id' => $id
|
'id' => $id
|
||||||
], true, true);
|
], true, true);
|
||||||
$this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_INFO, "[API] removed specialsettings on all subdomains of domain #" . $id);
|
$this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_NOTICE, "[API] removed specialsettings on all subdomains of domain #" . $id);
|
||||||
}
|
}
|
||||||
|
|
||||||
$wwwserveralias = ($serveraliasoption == '1') ? '1' : '0';
|
$wwwserveralias = ($serveraliasoption == '1') ? '1' : '0';
|
||||||
@@ -2221,7 +2221,7 @@ class Domains extends ApiCommand implements ResourceEntity
|
|||||||
// remove domain from acme.sh / lets encrypt if used
|
// remove domain from acme.sh / lets encrypt if used
|
||||||
Cronjob::inserttask(TaskId::DELETE_DOMAIN_SSL, $result['domain']);
|
Cronjob::inserttask(TaskId::DELETE_DOMAIN_SSL, $result['domain']);
|
||||||
|
|
||||||
$this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_INFO, "[API] deleted domain/subdomains (#" . $result['id'] . ")");
|
$this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_WARNING, "[API] deleted domain/subdomains (#" . $result['id'] . ")");
|
||||||
User::updateCounters();
|
User::updateCounters();
|
||||||
Cronjob::inserttask(TaskId::REBUILD_VHOST);
|
Cronjob::inserttask(TaskId::REBUILD_VHOST);
|
||||||
// Using nameserver, insert a task which rebuilds the server config
|
// Using nameserver, insert a task which rebuilds the server config
|
||||||
|
|||||||
@@ -311,7 +311,7 @@ class EmailAccounts extends ApiCommand implements ResourceEntity
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_INFO, "[API] added email account for '" . $result['email_full'] . "'");
|
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_NOTICE, "[API] added email account for '" . $result['email_full'] . "'");
|
||||||
$result = $this->apiCall('Emails.get', [
|
$result = $this->apiCall('Emails.get', [
|
||||||
'emailaddr' => $result['email_full']
|
'emailaddr' => $result['email_full']
|
||||||
]);
|
]);
|
||||||
@@ -460,7 +460,7 @@ class EmailAccounts extends ApiCommand implements ResourceEntity
|
|||||||
Admins::increaseUsage($customer['adminid'], 'email_quota_used', '', ($quota - $result['quota']));
|
Admins::increaseUsage($customer['adminid'], 'email_quota_used', '', ($quota - $result['quota']));
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_INFO, "[API] updated email account '" . $result['email_full'] . "'");
|
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_NOTICE, "[API] updated email account '" . $result['email_full'] . "'");
|
||||||
$result = $this->apiCall('Emails.get', [
|
$result = $this->apiCall('Emails.get', [
|
||||||
'emailaddr' => $result['email_full']
|
'emailaddr' => $result['email_full']
|
||||||
]);
|
]);
|
||||||
@@ -566,7 +566,7 @@ class EmailAccounts extends ApiCommand implements ResourceEntity
|
|||||||
Customers::decreaseUsage($customer['customerid'], 'email_accounts_used');
|
Customers::decreaseUsage($customer['customerid'], 'email_accounts_used');
|
||||||
Customers::decreaseUsage($customer['customerid'], 'email_quota_used', '', $quota);
|
Customers::decreaseUsage($customer['customerid'], 'email_quota_used', '', $quota);
|
||||||
|
|
||||||
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_INFO, "[API] deleted email account for '" . $result['email_full'] . "'");
|
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_WARNING, "[API] deleted email account for '" . $result['email_full'] . "'");
|
||||||
return $this->response($result);
|
return $this->response($result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ class EmailDomains extends ApiCommand implements ResourceEntity
|
|||||||
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
|
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||||
$result[] = $row;
|
$result[] = $row;
|
||||||
}
|
}
|
||||||
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_NOTICE,
|
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_INFO,
|
||||||
"[API] list email-domains");
|
"[API] list email-domains");
|
||||||
return $this->response([
|
return $this->response([
|
||||||
'count' => count($result),
|
'count' => count($result),
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ class EmailForwarders extends ApiCommand implements ResourceEntity
|
|||||||
// update customer usage
|
// update customer usage
|
||||||
Customers::increaseUsage($customer['customerid'], 'email_forwarders_used');
|
Customers::increaseUsage($customer['customerid'], 'email_forwarders_used');
|
||||||
|
|
||||||
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_INFO, "[API] added email forwarder for '" . $result['email_full'] . "'");
|
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_NOTICE, "[API] added email forwarder for '" . $result['email_full'] . "'");
|
||||||
|
|
||||||
$result = $this->apiCall('Emails.get', [
|
$result = $this->apiCall('Emails.get', [
|
||||||
'emailaddr' => $result['email_full']
|
'emailaddr' => $result['email_full']
|
||||||
@@ -298,7 +298,7 @@ class EmailForwarders extends ApiCommand implements ResourceEntity
|
|||||||
// update customer usage
|
// update customer usage
|
||||||
Customers::decreaseUsage($customer['customerid'], 'email_forwarders_used');
|
Customers::decreaseUsage($customer['customerid'], 'email_forwarders_used');
|
||||||
|
|
||||||
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_INFO, "[API] deleted email forwarder for '" . $result['email_full'] . "'");
|
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_NOTICE, "[API] deleted email forwarder for '" . $result['email_full'] . "'");
|
||||||
|
|
||||||
$result = $this->apiCall('Emails.get', [
|
$result = $this->apiCall('Emails.get', [
|
||||||
'emailaddr' => $result['email_full']
|
'emailaddr' => $result['email_full']
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ class Emails extends ApiCommand implements ResourceEntity
|
|||||||
// update customer usage
|
// update customer usage
|
||||||
Customers::increaseUsage($customer['customerid'], 'emails_used');
|
Customers::increaseUsage($customer['customerid'], 'emails_used');
|
||||||
|
|
||||||
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_INFO, "[API] added email address '" . $email_full . "'");
|
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_NOTICE, "[API] added email address '" . $email_full . "'");
|
||||||
|
|
||||||
$result = $this->apiCall('Emails.get', [
|
$result = $this->apiCall('Emails.get', [
|
||||||
'emailaddr' => $email_full
|
'emailaddr' => $email_full
|
||||||
@@ -199,7 +199,7 @@ class Emails extends ApiCommand implements ResourceEntity
|
|||||||
);
|
);
|
||||||
$result = Database::pexecute_first($result_stmt, $params, true, true);
|
$result = Database::pexecute_first($result_stmt, $params, true, true);
|
||||||
if ($result) {
|
if ($result) {
|
||||||
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_NOTICE, "[API] get email address '" . $result['email_full'] . "'");
|
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_INFO, "[API] get email address '" . $result['email_full'] . "'");
|
||||||
return $this->response($result);
|
return $this->response($result);
|
||||||
}
|
}
|
||||||
$key = ($id > 0 ? "id #" . $id : "emailaddr '" . $emailaddr . "'");
|
$key = ($id > 0 ? "id #" . $id : "emailaddr '" . $emailaddr . "'");
|
||||||
@@ -294,7 +294,7 @@ class Emails extends ApiCommand implements ResourceEntity
|
|||||||
"id" => $id
|
"id" => $id
|
||||||
];
|
];
|
||||||
Database::pexecute($stmt, $params, true, true);
|
Database::pexecute($stmt, $params, true, true);
|
||||||
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_INFO, "[API] toggled catchall-flag for email address '" . $result['email_full'] . "'");
|
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_NOTICE, "[API] toggled catchall-flag for email address '" . $result['email_full'] . "'");
|
||||||
|
|
||||||
$result = $this->apiCall('Emails.get', [
|
$result = $this->apiCall('Emails.get', [
|
||||||
'emailaddr' => $result['email_full']
|
'emailaddr' => $result['email_full']
|
||||||
@@ -340,7 +340,7 @@ class Emails extends ApiCommand implements ResourceEntity
|
|||||||
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
|
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||||
$result[] = $row;
|
$result[] = $row;
|
||||||
}
|
}
|
||||||
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_NOTICE, "[API] list email-addresses");
|
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_INFO, "[API] list email-addresses");
|
||||||
return $this->response([
|
return $this->response([
|
||||||
'count' => count($result),
|
'count' => count($result),
|
||||||
'list' => $result
|
'list' => $result
|
||||||
@@ -445,7 +445,7 @@ class Emails extends ApiCommand implements ResourceEntity
|
|||||||
], true, true);
|
], true, true);
|
||||||
Customers::decreaseUsage($customer['customerid'], 'emails_used');
|
Customers::decreaseUsage($customer['customerid'], 'emails_used');
|
||||||
|
|
||||||
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_INFO, "[API] deleted email address '" . $result['email_full'] . "'");
|
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_WARNING, "[API] deleted email address '" . $result['email_full'] . "'");
|
||||||
return $this->response($result);
|
return $this->response($result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ class FpmDaemons extends ApiCommand implements ResourceEntity
|
|||||||
public function listing()
|
public function listing()
|
||||||
{
|
{
|
||||||
if ($this->isAdmin()) {
|
if ($this->isAdmin()) {
|
||||||
$this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_NOTICE, "[API] list fpm-daemons");
|
$this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_INFO, "[API] list fpm-daemons");
|
||||||
$query_fields = [];
|
$query_fields = [];
|
||||||
$result_stmt = Database::prepare("
|
$result_stmt = Database::prepare("
|
||||||
SELECT * FROM `" . TABLE_PANEL_FPMDAEMONS . "`" . $this->getSearchWhere($query_fields) . $this->getOrderBy() . $this->getLimit());
|
SELECT * FROM `" . TABLE_PANEL_FPMDAEMONS . "`" . $this->getSearchWhere($query_fields) . $this->getOrderBy() . $this->getLimit());
|
||||||
@@ -258,7 +258,7 @@ class FpmDaemons extends ApiCommand implements ResourceEntity
|
|||||||
$id = Database::lastInsertId();
|
$id = Database::lastInsertId();
|
||||||
|
|
||||||
Cronjob::inserttask(TaskId::REBUILD_VHOST);
|
Cronjob::inserttask(TaskId::REBUILD_VHOST);
|
||||||
$this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_INFO, "[API] fpm-daemon with description '" . $description . "' has been created by '" . $this->getUserDetail('loginname') . "'");
|
$this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_NOTICE, "[API] fpm-daemon with description '" . $description . "' has been created by '" . $this->getUserDetail('loginname') . "'");
|
||||||
$result = $this->apiCall('FpmDaemons.get', [
|
$result = $this->apiCall('FpmDaemons.get', [
|
||||||
'id' => $id
|
'id' => $id
|
||||||
]);
|
]);
|
||||||
@@ -384,7 +384,7 @@ class FpmDaemons extends ApiCommand implements ResourceEntity
|
|||||||
Database::pexecute($upd_stmt, $upd_data, true, true);
|
Database::pexecute($upd_stmt, $upd_data, true, true);
|
||||||
|
|
||||||
Cronjob::inserttask(TaskId::REBUILD_VHOST);
|
Cronjob::inserttask(TaskId::REBUILD_VHOST);
|
||||||
$this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_INFO, "[API] fpm-daemon with description '" . $description . "' has been updated by '" . $this->getUserDetail('loginname') . "'");
|
$this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_NOTICE, "[API] fpm-daemon with description '" . $description . "' has been updated by '" . $this->getUserDetail('loginname') . "'");
|
||||||
$result = $this->apiCall('FpmDaemons.get', [
|
$result = $this->apiCall('FpmDaemons.get', [
|
||||||
'id' => $id
|
'id' => $id
|
||||||
]);
|
]);
|
||||||
@@ -433,7 +433,7 @@ class FpmDaemons extends ApiCommand implements ResourceEntity
|
|||||||
], true, true);
|
], true, true);
|
||||||
|
|
||||||
Cronjob::inserttask(TaskId::REBUILD_VHOST);
|
Cronjob::inserttask(TaskId::REBUILD_VHOST);
|
||||||
$this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_INFO, "[API] fpm-daemon setting '" . $result['description'] . "' has been deleted by '" . $this->getUserDetail('loginname') . "'");
|
$this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_NOTICE, "[API] fpm-daemon setting '" . $result['description'] . "' has been deleted by '" . $this->getUserDetail('loginname') . "'");
|
||||||
return $this->response($result);
|
return $this->response($result);
|
||||||
}
|
}
|
||||||
throw new Exception("Not allowed to execute given command.", 403);
|
throw new Exception("Not allowed to execute given command.", 403);
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ class Froxlor extends ApiCommand
|
|||||||
|
|
||||||
if (empty($uc_data) || empty($response) || $uc_data['ts'] + self::UPDATE_CHECK_INTERVAL < time() || $uc_data['channel'] != Settings::Get('system.update_channel') || $force_ucheck) {
|
if (empty($uc_data) || empty($response) || $uc_data['ts'] + self::UPDATE_CHECK_INTERVAL < time() || $uc_data['channel'] != Settings::Get('system.update_channel') || $force_ucheck) {
|
||||||
// log our actions
|
// log our actions
|
||||||
$this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_NOTICE, "[API] checking for updates");
|
$this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_INFO, "[API] checking for updates");
|
||||||
|
|
||||||
// check for new version
|
// check for new version
|
||||||
$aucheck = AutoUpdate::checkVersion();
|
$aucheck = AutoUpdate::checkVersion();
|
||||||
@@ -142,7 +142,7 @@ class Froxlor extends ApiCommand
|
|||||||
{
|
{
|
||||||
if ($this->isAdmin() && $this->getUserDetail('change_serversettings')) {
|
if ($this->isAdmin() && $this->getUserDetail('change_serversettings')) {
|
||||||
$json_str = $this->getParam('json_str');
|
$json_str = $this->getParam('json_str');
|
||||||
$this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_NOTICE, "User " . $this->getUserDetail('loginname') . " imported settings");
|
$this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_WARNING, "User " . $this->getUserDetail('loginname') . " imported settings");
|
||||||
try {
|
try {
|
||||||
SImExporter::import($json_str);
|
SImExporter::import($json_str);
|
||||||
Cronjob::inserttask(TaskId::REBUILD_VHOST);
|
Cronjob::inserttask(TaskId::REBUILD_VHOST);
|
||||||
|
|||||||
@@ -257,7 +257,7 @@ class Ftps extends ApiCommand implements ResourceEntity
|
|||||||
Customers::increaseUsage($customer['customerid'], 'ftp_lastaccountnumber');
|
Customers::increaseUsage($customer['customerid'], 'ftp_lastaccountnumber');
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_INFO, "[API] added ftp-account '" . $username . " (" . $path . ")'");
|
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_NOTICE, "[API] added ftp-account '" . $username . " (" . $path . ")'");
|
||||||
Cronjob::inserttask(TaskId::CREATE_FTP);
|
Cronjob::inserttask(TaskId::CREATE_FTP);
|
||||||
|
|
||||||
if ($sendinfomail == 1) {
|
if ($sendinfomail == 1) {
|
||||||
@@ -302,7 +302,7 @@ class Ftps extends ApiCommand implements ResourceEntity
|
|||||||
|
|
||||||
$this->mailer()->clearAddresses();
|
$this->mailer()->clearAddresses();
|
||||||
}
|
}
|
||||||
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_WARNING, "[API] added ftp-user '" . $username . "'");
|
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_NOTICE, "[API] added ftp-user '" . $username . "'");
|
||||||
|
|
||||||
$result = $this->apiCall('Ftps.get', [
|
$result = $this->apiCall('Ftps.get', [
|
||||||
'username' => $username
|
'username' => $username
|
||||||
@@ -367,7 +367,7 @@ class Ftps extends ApiCommand implements ResourceEntity
|
|||||||
$params['idun'] = ($id <= 0 ? $username : $id);
|
$params['idun'] = ($id <= 0 ? $username : $id);
|
||||||
$result = Database::pexecute_first($result_stmt, $params, true, true);
|
$result = Database::pexecute_first($result_stmt, $params, true, true);
|
||||||
if ($result) {
|
if ($result) {
|
||||||
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_NOTICE, "[API] get ftp-user '" . $result['username'] . "'");
|
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_INFO, "[API] get ftp-user '" . $result['username'] . "'");
|
||||||
return $this->response($result);
|
return $this->response($result);
|
||||||
}
|
}
|
||||||
$key = ($id > 0 ? "id #" . $id : "username '" . $username . "'");
|
$key = ($id > 0 ? "id #" . $id : "username '" . $username . "'");
|
||||||
@@ -453,7 +453,7 @@ class Ftps extends ApiCommand implements ResourceEntity
|
|||||||
"id" => $id,
|
"id" => $id,
|
||||||
"password" => $cryptPassword
|
"password" => $cryptPassword
|
||||||
], true, true);
|
], true, true);
|
||||||
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_INFO, "[API] updated ftp-account password for '" . $result['username'] . "'");
|
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_NOTICE, "[API] updated ftp-account password for '" . $result['username'] . "'");
|
||||||
}
|
}
|
||||||
|
|
||||||
// path update?
|
// path update?
|
||||||
@@ -471,7 +471,7 @@ class Ftps extends ApiCommand implements ResourceEntity
|
|||||||
"customerid" => $customer['customerid'],
|
"customerid" => $customer['customerid'],
|
||||||
"id" => $id
|
"id" => $id
|
||||||
], true, true);
|
], true, true);
|
||||||
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_INFO, "[API] updated ftp-account homdir for '" . $result['username'] . "'");
|
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_NOTICE, "[API] updated ftp-account homdir for '" . $result['username'] . "'");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// it's the task for "new ftp" but that will
|
// it's the task for "new ftp" but that will
|
||||||
@@ -533,7 +533,7 @@ class Ftps extends ApiCommand implements ResourceEntity
|
|||||||
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
|
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||||
$result[] = $row;
|
$result[] = $row;
|
||||||
}
|
}
|
||||||
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_NOTICE, "[API] list ftp-users");
|
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_INFO, "[API] list ftp-users");
|
||||||
return $this->response([
|
return $this->response([
|
||||||
'count' => count($result),
|
'count' => count($result),
|
||||||
'list' => $result
|
'list' => $result
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ class HostingPlans extends ApiCommand implements ResourceEntity
|
|||||||
public function listing()
|
public function listing()
|
||||||
{
|
{
|
||||||
if ($this->isAdmin()) {
|
if ($this->isAdmin()) {
|
||||||
$this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_NOTICE, "[API] list hosting-plans");
|
$this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_INFO, "[API] list hosting-plans");
|
||||||
$query_fields = [];
|
$query_fields = [];
|
||||||
$result_stmt = Database::prepare("
|
$result_stmt = Database::prepare("
|
||||||
SELECT p.*, a.loginname as adminname
|
SELECT p.*, a.loginname as adminname
|
||||||
@@ -200,8 +200,8 @@ class HostingPlans extends ApiCommand implements ResourceEntity
|
|||||||
$value_arr['logviewenabled'] = $this->getBoolParam('logviewenabled', true, 0);
|
$value_arr['logviewenabled'] = $this->getBoolParam('logviewenabled', true, 0);
|
||||||
|
|
||||||
// validation
|
// validation
|
||||||
$name = Validate::validate(trim($name), 'name', '', '', [], true);
|
$name = Validate::validate(trim($name), 'name', Validate::REGEX_DESC_TEXT, '', [], true);
|
||||||
$description = Validate::validate(str_replace("\r\n", "\n", $description), 'description', Validate::REGEX_DESC_TEXT);
|
$description = Validate::validate(str_replace("\r\n", "\n", $description), 'description', Validate::REGEX_CONF_TEXT);
|
||||||
|
|
||||||
if (Settings::Get('system.mail_quota_enabled') != '1') {
|
if (Settings::Get('system.mail_quota_enabled') != '1') {
|
||||||
$value_arr['email_quota'] = -1;
|
$value_arr['email_quota'] = -1;
|
||||||
@@ -227,7 +227,7 @@ class HostingPlans extends ApiCommand implements ResourceEntity
|
|||||||
'valuearr' => json_encode($value_arr)
|
'valuearr' => json_encode($value_arr)
|
||||||
];
|
];
|
||||||
Database::pexecute($ins_stmt, $ins_data, true, true);
|
Database::pexecute($ins_stmt, $ins_data, true, true);
|
||||||
$this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_WARNING, "[API] added hosting-plan '" . $name . "'");
|
$this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_NOTICE, "[API] added hosting-plan '" . $name . "'");
|
||||||
$result = $this->apiCall('HostingPlans.get', [
|
$result = $this->apiCall('HostingPlans.get', [
|
||||||
'planname' => $name
|
'planname' => $name
|
||||||
]);
|
]);
|
||||||
@@ -264,7 +264,7 @@ class HostingPlans extends ApiCommand implements ResourceEntity
|
|||||||
}
|
}
|
||||||
$result = Database::pexecute_first($result_stmt, $params, true, true);
|
$result = Database::pexecute_first($result_stmt, $params, true, true);
|
||||||
if ($result) {
|
if ($result) {
|
||||||
$this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_NOTICE, "[API] get hosting-plan '" . $result['name'] . "'");
|
$this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_INFO, "[API] get hosting-plan '" . $result['name'] . "'");
|
||||||
return $this->response($result);
|
return $this->response($result);
|
||||||
}
|
}
|
||||||
$key = ($id > 0 ? "id #" . $id : "planname '" . $planname . "'");
|
$key = ($id > 0 ? "id #" . $id : "planname '" . $planname . "'");
|
||||||
@@ -382,8 +382,8 @@ class HostingPlans extends ApiCommand implements ResourceEntity
|
|||||||
$value_arr['logviewenabled'] = $this->getBoolParam('logviewenabled', true, $result['logviewenabled']);
|
$value_arr['logviewenabled'] = $this->getBoolParam('logviewenabled', true, $result['logviewenabled']);
|
||||||
|
|
||||||
// validation
|
// validation
|
||||||
$name = Validate::validate(trim($name), 'name', '', '', [], true);
|
$name = Validate::validate(trim($name), 'name', Validate::REGEX_DESC_TEXT, '', [], true);
|
||||||
$description = Validate::validate(str_replace("\r\n", "\n", $description), 'description', Validate::REGEX_DESC_TEXT);
|
$description = Validate::validate(str_replace("\r\n", "\n", $description), 'description', Validate::REGEX_CONF_TEXT);
|
||||||
|
|
||||||
if (Settings::Get('system.mail_quota_enabled') != '1') {
|
if (Settings::Get('system.mail_quota_enabled') != '1') {
|
||||||
$value_arr['email_quota'] = -1;
|
$value_arr['email_quota'] = -1;
|
||||||
@@ -414,7 +414,7 @@ class HostingPlans extends ApiCommand implements ResourceEntity
|
|||||||
'id' => $id
|
'id' => $id
|
||||||
];
|
];
|
||||||
Database::pexecute($upd_stmt, $update_data, true, true);
|
Database::pexecute($upd_stmt, $update_data, true, true);
|
||||||
$this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_WARNING, "[API] updated hosting-plan '" . $result['name'] . "'");
|
$this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_NOTICE, "[API] updated hosting-plan '" . $result['name'] . "'");
|
||||||
return $this->response($update_data);
|
return $this->response($update_data);
|
||||||
}
|
}
|
||||||
throw new Exception("Not allowed to execute given command.", 403);
|
throw new Exception("Not allowed to execute given command.", 403);
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ class IpsAndPorts extends ApiCommand implements ResourceEntity
|
|||||||
public function listing()
|
public function listing()
|
||||||
{
|
{
|
||||||
if ($this->isAdmin() && ($this->getUserDetail('change_serversettings') || !empty($this->getUserDetail('ip')))) {
|
if ($this->isAdmin() && ($this->getUserDetail('change_serversettings') || !empty($this->getUserDetail('ip')))) {
|
||||||
$this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_NOTICE, "[API] list ips and ports");
|
$this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_INFO, "[API] list ips and ports");
|
||||||
$ip_where = "";
|
$ip_where = "";
|
||||||
$append_where = false;
|
$append_where = false;
|
||||||
if (!empty($this->getUserDetail('ip')) && $this->getUserDetail('ip') != -1) {
|
if (!empty($this->getUserDetail('ip')) && $this->getUserDetail('ip') != -1) {
|
||||||
@@ -175,9 +175,9 @@ class IpsAndPorts extends ApiCommand implements ResourceEntity
|
|||||||
$docroot = Validate::validate($this->getParam('docroot', true, ''), 'docroot', Validate::REGEX_DIR, '', [], true);
|
$docroot = Validate::validate($this->getParam('docroot', true, ''), 'docroot', Validate::REGEX_DIR, '', [], true);
|
||||||
|
|
||||||
if ((int)Settings::Get('system.use_ssl') == 1) {
|
if ((int)Settings::Get('system.use_ssl') == 1) {
|
||||||
$ssl = !empty($this->getBoolParam('ssl', true, 0)) ? intval($this->getBoolParam('ssl', true, 0)) : 0;
|
$ssl = (bool)$this->getBoolParam('ssl', true, 0);
|
||||||
$ssl_cert_file = Validate::validate($this->getParam('ssl_cert_file', $ssl, ''), 'ssl_cert_file', '', '', [], true);
|
$ssl_cert_file = Validate::validate($this->getParam('ssl_cert_file', !$ssl, ''), 'ssl_cert_file', '', '', [], true);
|
||||||
$ssl_key_file = Validate::validate($this->getParam('ssl_key_file', $ssl, ''), 'ssl_key_file', '', '', [], true);
|
$ssl_key_file = Validate::validate($this->getParam('ssl_key_file', !$ssl, ''), 'ssl_key_file', '', '', [], true);
|
||||||
$ssl_ca_file = Validate::validate($this->getParam('ssl_ca_file', true, ''), 'ssl_ca_file', '', '', [], true);
|
$ssl_ca_file = Validate::validate($this->getParam('ssl_ca_file', true, ''), 'ssl_ca_file', '', '', [], true);
|
||||||
$ssl_cert_chainfile = Validate::validate($this->getParam('ssl_cert_chainfile', true, ''), 'ssl_cert_chainfile', '', '', [], true);
|
$ssl_cert_chainfile = Validate::validate($this->getParam('ssl_cert_chainfile', true, ''), 'ssl_cert_chainfile', '', '', [], true);
|
||||||
$sslss = $this->getParam('ssl_specialsettings', true, '');
|
$sslss = $this->getParam('ssl_specialsettings', true, '');
|
||||||
@@ -335,7 +335,7 @@ class IpsAndPorts extends ApiCommand implements ResourceEntity
|
|||||||
'id' => $id
|
'id' => $id
|
||||||
], true, true);
|
], true, true);
|
||||||
if ($result) {
|
if ($result) {
|
||||||
$this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_NOTICE, "[API] get ip " . $result['ip'] . " " . $result['port']);
|
$this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_INFO, "[API] get ip " . $result['ip'] . " " . $result['port']);
|
||||||
return $this->response($result);
|
return $this->response($result);
|
||||||
}
|
}
|
||||||
throw new Exception("IP/port with id #" . $id . " could not be found", 404);
|
throw new Exception("IP/port with id #" . $id . " could not be found", 404);
|
||||||
@@ -414,9 +414,9 @@ class IpsAndPorts extends ApiCommand implements ResourceEntity
|
|||||||
$docroot = Validate::validate($this->getParam('docroot', true, $result['docroot']), 'docroot', Validate::REGEX_DIR, '', [], true);
|
$docroot = Validate::validate($this->getParam('docroot', true, $result['docroot']), 'docroot', Validate::REGEX_DIR, '', [], true);
|
||||||
|
|
||||||
if ((int)Settings::Get('system.use_ssl') == 1) {
|
if ((int)Settings::Get('system.use_ssl') == 1) {
|
||||||
$ssl = $this->getBoolParam('ssl', true, $result['ssl']);
|
$ssl = (bool)$this->getBoolParam('ssl', true, $result['ssl']);
|
||||||
$ssl_cert_file = Validate::validate($this->getParam('ssl_cert_file', $ssl, $result['ssl_cert_file']), 'ssl_cert_file', '', '', [], true);
|
$ssl_cert_file = Validate::validate($this->getParam('ssl_cert_file', !$ssl, $result['ssl_cert_file']), 'ssl_cert_file', '', '', [], true);
|
||||||
$ssl_key_file = Validate::validate($this->getParam('ssl_key_file', $ssl, $result['ssl_key_file']), 'ssl_key_file', '', '', [], true);
|
$ssl_key_file = Validate::validate($this->getParam('ssl_key_file', !$ssl, $result['ssl_key_file']), 'ssl_key_file', '', '', [], true);
|
||||||
$ssl_ca_file = Validate::validate($this->getParam('ssl_ca_file', true, $result['ssl_ca_file']), 'ssl_ca_file', '', '', [], true);
|
$ssl_ca_file = Validate::validate($this->getParam('ssl_ca_file', true, $result['ssl_ca_file']), 'ssl_ca_file', '', '', [], true);
|
||||||
$ssl_cert_chainfile = Validate::validate($this->getParam('ssl_cert_chainfile', true, $result['ssl_cert_chainfile']), 'ssl_cert_chainfile', '', '', [], true);
|
$ssl_cert_chainfile = Validate::validate($this->getParam('ssl_cert_chainfile', true, $result['ssl_cert_chainfile']), 'ssl_cert_chainfile', '', '', [], true);
|
||||||
$sslss = $this->getParam('ssl_specialsettings', true, $result['ssl_specialsettings']);
|
$sslss = $this->getParam('ssl_specialsettings', true, $result['ssl_specialsettings']);
|
||||||
|
|||||||
@@ -26,14 +26,15 @@
|
|||||||
namespace Froxlor\Api\Commands;
|
namespace Froxlor\Api\Commands;
|
||||||
|
|
||||||
use Exception;
|
use Exception;
|
||||||
use PDO;
|
|
||||||
use PDOException;
|
|
||||||
use Froxlor\Froxlor;
|
|
||||||
use Froxlor\PhpHelper;
|
|
||||||
use Froxlor\Api\ApiCommand;
|
use Froxlor\Api\ApiCommand;
|
||||||
use Froxlor\Api\ResourceEntity;
|
use Froxlor\Api\ResourceEntity;
|
||||||
use Froxlor\Database\Database;
|
use Froxlor\Database\Database;
|
||||||
|
use Froxlor\Froxlor;
|
||||||
|
use Froxlor\FroxlorLogger;
|
||||||
|
use Froxlor\PhpHelper;
|
||||||
use Froxlor\Validate\Validate;
|
use Froxlor\Validate\Validate;
|
||||||
|
use PDO;
|
||||||
|
use PDOException;
|
||||||
|
|
||||||
class MysqlServer extends ApiCommand implements ResourceEntity
|
class MysqlServer extends ApiCommand implements ResourceEntity
|
||||||
{
|
{
|
||||||
@@ -73,8 +74,8 @@ class MysqlServer extends ApiCommand implements ResourceEntity
|
|||||||
* optional, test connection with given credentials, default is true (yes)
|
* optional, test connection with given credentials, default is true (yes)
|
||||||
*
|
*
|
||||||
* @access admin
|
* @access admin
|
||||||
* @throws Exception
|
|
||||||
* @return string json-encoded array
|
* @return string json-encoded array
|
||||||
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function add()
|
public function add()
|
||||||
{
|
{
|
||||||
@@ -112,7 +113,7 @@ class MysqlServer extends ApiCommand implements ResourceEntity
|
|||||||
);
|
);
|
||||||
if (!empty($mysql_ca)) {
|
if (!empty($mysql_ca)) {
|
||||||
$options[PDO::MYSQL_ATTR_SSL_CA] = $mysql_ca;
|
$options[PDO::MYSQL_ATTR_SSL_CA] = $mysql_ca;
|
||||||
$options[PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT] = (bool) $mysql_verifycert;
|
$options[PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT] = (bool)$mysql_verifycert;
|
||||||
}
|
}
|
||||||
|
|
||||||
$dsn = "mysql:host=" . $mysql_host . ";port=" . $mysql_port . ";";
|
$dsn = "mysql:host=" . $mysql_host . ";port=" . $mysql_port . ";";
|
||||||
@@ -167,6 +168,8 @@ class MysqlServer extends ApiCommand implements ResourceEntity
|
|||||||
$this->addDatabaseFromCustomerAllowedList($newdbserver);
|
$this->addDatabaseFromCustomerAllowedList($newdbserver);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_WARNING, "[API] added new database server '" . $description . "' (" . $mysql_host . ")");
|
||||||
|
|
||||||
return $this->response(['dbserver' => $newdbserver]);
|
return $this->response(['dbserver' => $newdbserver]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -179,16 +182,16 @@ class MysqlServer extends ApiCommand implements ResourceEntity
|
|||||||
* optional the number of the mysql server (either id or dbserver must be set)
|
* optional the number of the mysql server (either id or dbserver must be set)
|
||||||
*
|
*
|
||||||
* @access admin
|
* @access admin
|
||||||
* @throws Exception
|
|
||||||
* @return string json-encoded array
|
* @return string json-encoded array
|
||||||
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function delete()
|
public function delete()
|
||||||
{
|
{
|
||||||
$this->validateAccess();
|
$this->validateAccess();
|
||||||
|
|
||||||
$id = (int) $this->getParam('id', true, -1);
|
$id = (int)$this->getParam('id', true, -1);
|
||||||
$dn_optional = $id >= 0;
|
$dn_optional = $id >= 0;
|
||||||
$dbserver = (int) $this->getParam('dbserver', $dn_optional, -1);
|
$dbserver = (int)$this->getParam('dbserver', $dn_optional, -1);
|
||||||
$dbserver = $id >= 0 ? $id : $dbserver;
|
$dbserver = $id >= 0 ? $id : $dbserver;
|
||||||
|
|
||||||
if ($dbserver == 0) {
|
if ($dbserver == 0) {
|
||||||
@@ -212,8 +215,12 @@ class MysqlServer extends ApiCommand implements ResourceEntity
|
|||||||
// when removing, remove from list of allowed_mysqlservers from any customers
|
// when removing, remove from list of allowed_mysqlservers from any customers
|
||||||
$this->removeDatabaseFromCustomerAllowedList($dbserver);
|
$this->removeDatabaseFromCustomerAllowedList($dbserver);
|
||||||
|
|
||||||
|
$description = $sql_root[$dbserver]['caption'] ?? "unknown";
|
||||||
|
$mysql_host = $sql_root[$dbserver]['host'] ?? "unknown";
|
||||||
unset($sql_root[$dbserver]);
|
unset($sql_root[$dbserver]);
|
||||||
|
|
||||||
|
$this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_WARNING, "[API] removed database server '" . $description . "' (" . $mysql_host . ")");
|
||||||
|
|
||||||
$this->generateNewUserData($sql, $sql_root);
|
$this->generateNewUserData($sql, $sql_root);
|
||||||
return $this->response(['true']);
|
return $this->response(['true']);
|
||||||
}
|
}
|
||||||
@@ -287,14 +294,14 @@ class MysqlServer extends ApiCommand implements ResourceEntity
|
|||||||
* optional the number of the mysql server (either id or dbserver must be set)
|
* optional the number of the mysql server (either id or dbserver must be set)
|
||||||
*
|
*
|
||||||
* @access admin, customer
|
* @access admin, customer
|
||||||
* @throws Exception
|
|
||||||
* @return string json-encoded array
|
* @return string json-encoded array
|
||||||
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function get()
|
public function get()
|
||||||
{
|
{
|
||||||
$id = (int) $this->getParam('id', true, -1);
|
$id = (int)$this->getParam('id', true, -1);
|
||||||
$dn_optional = $id >= 0;
|
$dn_optional = $id >= 0;
|
||||||
$dbserver = (int) $this->getParam('dbserver', $dn_optional, -1);
|
$dbserver = (int)$this->getParam('dbserver', $dn_optional, -1);
|
||||||
$dbserver = $id >= 0 ? $id : $dbserver;
|
$dbserver = $id >= 0 ? $id : $dbserver;
|
||||||
|
|
||||||
$sql_root = [];
|
$sql_root = [];
|
||||||
@@ -317,6 +324,7 @@ class MysqlServer extends ApiCommand implements ResourceEntity
|
|||||||
|
|
||||||
unset($sql_root[$dbserver]['password']);
|
unset($sql_root[$dbserver]['password']);
|
||||||
$sql_root[$dbserver]['id'] = $dbserver;
|
$sql_root[$dbserver]['id'] = $dbserver;
|
||||||
|
$this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_INFO, "[API] get database-server '" . $sql_root[$dbserver]['caption'] . "'");
|
||||||
return $this->response($sql_root[$dbserver]);
|
return $this->response($sql_root[$dbserver]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -347,16 +355,16 @@ class MysqlServer extends ApiCommand implements ResourceEntity
|
|||||||
* optional, test connection with given credentials, default is true (yes)
|
* optional, test connection with given credentials, default is true (yes)
|
||||||
*
|
*
|
||||||
* @access admin
|
* @access admin
|
||||||
* @throws Exception
|
|
||||||
* @return string json-encoded array
|
* @return string json-encoded array
|
||||||
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function update()
|
public function update()
|
||||||
{
|
{
|
||||||
$this->validateAccess();
|
$this->validateAccess();
|
||||||
|
|
||||||
$id = (int) $this->getParam('id', true, -1);
|
$id = (int)$this->getParam('id', true, -1);
|
||||||
$dn_optional = $id >= 0;
|
$dn_optional = $id >= 0;
|
||||||
$dbserver = (int) $this->getParam('dbserver', $dn_optional, -1);
|
$dbserver = (int)$this->getParam('dbserver', $dn_optional, -1);
|
||||||
$dbserver = $id >= 0 ? $id : $dbserver;
|
$dbserver = $id >= 0 ? $id : $dbserver;
|
||||||
|
|
||||||
$sql_root = [];
|
$sql_root = [];
|
||||||
@@ -417,7 +425,7 @@ class MysqlServer extends ApiCommand implements ResourceEntity
|
|||||||
);
|
);
|
||||||
if (!empty($mysql_ca)) {
|
if (!empty($mysql_ca)) {
|
||||||
$options[PDO::MYSQL_ATTR_SSL_CA] = $mysql_ca;
|
$options[PDO::MYSQL_ATTR_SSL_CA] = $mysql_ca;
|
||||||
$options[PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT] = (bool) $mysql_verifycert;
|
$options[PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT] = (bool)$mysql_verifycert;
|
||||||
}
|
}
|
||||||
|
|
||||||
$dsn = "mysql:host=" . $mysql_host . ";port=" . $mysql_port . ";";
|
$dsn = "mysql:host=" . $mysql_host . ";port=" . $mysql_port . ";";
|
||||||
@@ -448,6 +456,8 @@ class MysqlServer extends ApiCommand implements ResourceEntity
|
|||||||
$this->addDatabaseFromCustomerAllowedList($dbserver);
|
$this->addDatabaseFromCustomerAllowedList($dbserver);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_WARNING, "[API] edited database server '" . $description . "' (" . $mysql_host . ")");
|
||||||
|
|
||||||
return $this->response(['true']);
|
return $this->response(['true']);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -472,7 +482,7 @@ class MysqlServer extends ApiCommand implements ResourceEntity
|
|||||||
WHERE `dbserver` = :dbserver
|
WHERE `dbserver` = :dbserver
|
||||||
");
|
");
|
||||||
$result = Database::pexecute_first($result_stmt, ['dbserver' => $dbserver], true, true);
|
$result = Database::pexecute_first($result_stmt, ['dbserver' => $dbserver], true, true);
|
||||||
return (int) $result['num_dbs'];
|
return (int)$result['num_dbs'];
|
||||||
} else {
|
} else {
|
||||||
$dbserver = $this->getParam('mysql_server');
|
$dbserver = $this->getParam('mysql_server');
|
||||||
$customer_ids = $this->getAllowedCustomerIds();
|
$customer_ids = $this->getAllowedCustomerIds();
|
||||||
|
|||||||
@@ -199,7 +199,7 @@ class Mysqls extends ApiCommand implements ResourceEntity
|
|||||||
|
|
||||||
$this->mailer()->clearAddresses();
|
$this->mailer()->clearAddresses();
|
||||||
}
|
}
|
||||||
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_WARNING, "[API] added mysql-database '" . $username . "'");
|
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_NOTICE, "[API] added mysql-database '" . $username . "'");
|
||||||
|
|
||||||
$result = $this->apiCall('Mysqls.get', [
|
$result = $this->apiCall('Mysqls.get', [
|
||||||
'dbname' => $username,
|
'dbname' => $username,
|
||||||
@@ -299,7 +299,7 @@ class Mysqls extends ApiCommand implements ResourceEntity
|
|||||||
$mbdata = $mbdata_stmt->fetch(PDO::FETCH_ASSOC);
|
$mbdata = $mbdata_stmt->fetch(PDO::FETCH_ASSOC);
|
||||||
Database::needRoot(false);
|
Database::needRoot(false);
|
||||||
$result['size'] = $mbdata['MB'] ?? 0;
|
$result['size'] = $mbdata['MB'] ?? 0;
|
||||||
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_NOTICE, "[API] get database '" . $result['databasename'] . "'");
|
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_INFO, "[API] get database '" . $result['databasename'] . "'");
|
||||||
return $this->response($result);
|
return $this->response($result);
|
||||||
}
|
}
|
||||||
$key = ($id > 0 ? "id #" . $id : "dbname '" . $dbname . "'");
|
$key = ($id > 0 ? "id #" . $id : "dbname '" . $dbname . "'");
|
||||||
@@ -388,7 +388,7 @@ class Mysqls extends ApiCommand implements ResourceEntity
|
|||||||
];
|
];
|
||||||
Database::pexecute($stmt, $params, true, true);
|
Database::pexecute($stmt, $params, true, true);
|
||||||
|
|
||||||
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_WARNING, "[API] updated mysql-database '" . $result['databasename'] . "'");
|
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_NOTICE, "[API] updated mysql-database '" . $result['databasename'] . "'");
|
||||||
$result = $this->apiCall('Mysqls.get', [
|
$result = $this->apiCall('Mysqls.get', [
|
||||||
'dbname' => $result['databasename']
|
'dbname' => $result['databasename']
|
||||||
]);
|
]);
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ class PhpSettings extends ApiCommand implements ResourceEntity
|
|||||||
public function listing()
|
public function listing()
|
||||||
{
|
{
|
||||||
if ($this->isAdmin()) {
|
if ($this->isAdmin()) {
|
||||||
$this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_NOTICE, "[API] list php-configs");
|
$this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_INFO, "[API] list php-configs");
|
||||||
|
|
||||||
$with_subdomains = $this->getBoolParam('with_subdomains', true, false);
|
$with_subdomains = $this->getBoolParam('with_subdomains', true, false);
|
||||||
$query_fields = [];
|
$query_fields = [];
|
||||||
@@ -392,7 +392,7 @@ class PhpSettings extends ApiCommand implements ResourceEntity
|
|||||||
$ins_data['id'] = Database::lastInsertId();
|
$ins_data['id'] = Database::lastInsertId();
|
||||||
|
|
||||||
Cronjob::inserttask(TaskId::REBUILD_VHOST);
|
Cronjob::inserttask(TaskId::REBUILD_VHOST);
|
||||||
$this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_INFO, "[API] php setting with description '" . $description . "' has been created by '" . $this->getUserDetail('loginname') . "'");
|
$this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_NOTICE, "[API] php setting with description '" . $description . "' has been created by '" . $this->getUserDetail('loginname') . "'");
|
||||||
|
|
||||||
$result = $this->apiCall('PhpSettings.get', [
|
$result = $this->apiCall('PhpSettings.get', [
|
||||||
'id' => $ins_data['id']
|
'id' => $ins_data['id']
|
||||||
@@ -629,7 +629,7 @@ class PhpSettings extends ApiCommand implements ResourceEntity
|
|||||||
Database::pexecute($upd_stmt, $upd_data, true, true);
|
Database::pexecute($upd_stmt, $upd_data, true, true);
|
||||||
|
|
||||||
Cronjob::inserttask(TaskId::REBUILD_VHOST);
|
Cronjob::inserttask(TaskId::REBUILD_VHOST);
|
||||||
$this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_INFO, "[API] php setting with description '" . $description . "' has been updated by '" . $this->getUserDetail('loginname') . "'");
|
$this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_NOTICE, "[API] php setting with description '" . $description . "' has been updated by '" . $this->getUserDetail('loginname') . "'");
|
||||||
|
|
||||||
$result = $this->apiCall('PhpSettings.get', [
|
$result = $this->apiCall('PhpSettings.get', [
|
||||||
'id' => $id
|
'id' => $id
|
||||||
@@ -686,7 +686,7 @@ class PhpSettings extends ApiCommand implements ResourceEntity
|
|||||||
], true, true);
|
], true, true);
|
||||||
|
|
||||||
Cronjob::inserttask(TaskId::REBUILD_VHOST);
|
Cronjob::inserttask(TaskId::REBUILD_VHOST);
|
||||||
$this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_INFO, "[API] php setting '" . $result['description'] . "' has been deleted by '" . $this->getUserDetail('loginname') . "'");
|
$this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_WARNING, "[API] php setting '" . $result['description'] . "' has been deleted by '" . $this->getUserDetail('loginname') . "'");
|
||||||
return $this->response($result);
|
return $this->response($result);
|
||||||
}
|
}
|
||||||
throw new Exception("Not allowed to execute given command.", 403);
|
throw new Exception("Not allowed to execute given command.", 403);
|
||||||
|
|||||||
@@ -486,7 +486,7 @@ class SubDomains extends ApiCommand implements ResourceEntity
|
|||||||
$result['ipsandports'] = $this->getIpsForDomain($result['id']);
|
$result['ipsandports'] = $this->getIpsForDomain($result['id']);
|
||||||
}
|
}
|
||||||
$result['domain_hascert'] = $this->getHasCertValueForDomain((int)$result['id'], (int)$result['parentdomainid']);
|
$result['domain_hascert'] = $this->getHasCertValueForDomain((int)$result['id'], (int)$result['parentdomainid']);
|
||||||
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_NOTICE, "[API] get subdomain '" . $result['domain'] . "'");
|
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_INFO, "[API] get subdomain '" . $result['domain'] . "'");
|
||||||
return $this->response($result);
|
return $this->response($result);
|
||||||
}
|
}
|
||||||
$key = ($id > 0 ? "id #" . $id : "domainname '" . $domainname . "'");
|
$key = ($id > 0 ? "id #" . $id : "domainname '" . $domainname . "'");
|
||||||
@@ -856,7 +856,7 @@ class SubDomains extends ApiCommand implements ResourceEntity
|
|||||||
Cronjob::inserttask(TaskId::REBUILD_VHOST);
|
Cronjob::inserttask(TaskId::REBUILD_VHOST);
|
||||||
Cronjob::inserttask(TaskId::REBUILD_DNS);
|
Cronjob::inserttask(TaskId::REBUILD_DNS);
|
||||||
$idna_convert = new IdnaWrapper();
|
$idna_convert = new IdnaWrapper();
|
||||||
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_INFO, "[API] edited domain '" . $idna_convert->decode($result['domain']) . "'");
|
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_NOTICE, "[API] edited domain '" . $idna_convert->decode($result['domain']) . "'");
|
||||||
}
|
}
|
||||||
$result = $this->apiCall('SubDomains.get', [
|
$result = $this->apiCall('SubDomains.get', [
|
||||||
'id' => $id
|
'id' => $id
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ class SysLog extends ApiCommand implements ResourceEntity
|
|||||||
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
|
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||||
$result[] = $row;
|
$result[] = $row;
|
||||||
}
|
}
|
||||||
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_NOTICE, "[API] list log-entries");
|
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_INFO, "[API] list log-entries");
|
||||||
return $this->response([
|
return $this->response([
|
||||||
'count' => count($result),
|
'count' => count($result),
|
||||||
'list' => $result
|
'list' => $result
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ class Traffic extends ApiCommand implements ResourceEntity
|
|||||||
$row['mail'] *= 1024;
|
$row['mail'] *= 1024;
|
||||||
$result[] = $row;
|
$result[] = $row;
|
||||||
}
|
}
|
||||||
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_NOTICE, "[API] list traffic");
|
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_INFO, "[API] list traffic");
|
||||||
return $this->response([
|
return $this->response([
|
||||||
'count' => count($result),
|
'count' => count($result),
|
||||||
'list' => $result
|
'list' => $result
|
||||||
|
|||||||
178
lib/Froxlor/Cli/ConfigDiff.php
Normal file
178
lib/Froxlor/Cli/ConfigDiff.php
Normal file
@@ -0,0 +1,178 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This file is part of the Froxlor project.
|
||||||
|
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2
|
||||||
|
* of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, you can also view it online at
|
||||||
|
* https://files.froxlor.org/misc/COPYING.txt
|
||||||
|
*
|
||||||
|
* @copyright the authors
|
||||||
|
* @author Froxlor team <team@froxlor.org>
|
||||||
|
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Froxlor\Cli;
|
||||||
|
|
||||||
|
use Froxlor\Config\ConfigParser;
|
||||||
|
use Froxlor\FileDir;
|
||||||
|
use Froxlor\Froxlor;
|
||||||
|
use Symfony\Component\Console\Input\InputArgument;
|
||||||
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
|
use Symfony\Component\Console\Input\InputOption;
|
||||||
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
|
||||||
|
final class ConfigDiff extends CliCommand
|
||||||
|
{
|
||||||
|
protected function configure(): void
|
||||||
|
{
|
||||||
|
$this->setName('froxlor:config-diff')
|
||||||
|
->setDescription('Shows differences in config templates between OS versions')
|
||||||
|
->addArgument('from', InputArgument::OPTIONAL, 'OS version to compare against')
|
||||||
|
->addArgument('to', InputArgument::OPTIONAL, 'OS version to compare from')
|
||||||
|
->addOption('list', 'l', InputOption::VALUE_NONE, 'List all possible OS versions')
|
||||||
|
->addOption('diff-params', '', InputOption::VALUE_REQUIRED, 'Additional parameters for `diff`, e.g. --diff-params="--color=always"');
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function execute(InputInterface $input, OutputInterface $output): int
|
||||||
|
{
|
||||||
|
require Froxlor::getInstallDir() . '/lib/functions.php';
|
||||||
|
|
||||||
|
$parsers = $versions = [];
|
||||||
|
foreach (glob(Froxlor::getInstallDir() . '/lib/configfiles/*.xml') as $config) {
|
||||||
|
$name = str_replace(".xml", "", strtolower(basename($config)));
|
||||||
|
$parser = new ConfigParser($config);
|
||||||
|
$versions[$name] = $parser->getCompleteDistroName();
|
||||||
|
$parsers[$name] = $parser;
|
||||||
|
}
|
||||||
|
asort($versions);
|
||||||
|
|
||||||
|
if ($input->getOption('list') === true) {
|
||||||
|
$output->writeln('The following OS version templates are available:');
|
||||||
|
foreach ($versions as $k => $v) {
|
||||||
|
$output->writeln(str_pad($k, 20) . $v);
|
||||||
|
}
|
||||||
|
return self::SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$input->hasArgument('from') || !array_key_exists($input->getArgument('from'), $versions)) {
|
||||||
|
$output->writeln('<error>Missing or invalid "from" argument.</error>');
|
||||||
|
$output->writeln('Available versions: ' . implode(', ', array_keys($versions)));
|
||||||
|
return self::INVALID;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$input->hasArgument('to') || !array_key_exists($input->getArgument('to'), $versions)) {
|
||||||
|
$output->writeln('<error>Missing or invalid "to" argument.</error>');
|
||||||
|
$output->writeln('Available versions: ' . implode(', ', array_keys($versions)));
|
||||||
|
return self::INVALID;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Make sure diff is installed
|
||||||
|
$check_diff_installed = FileDir::safe_exec('which diff');
|
||||||
|
if (count($check_diff_installed) === 0) {
|
||||||
|
$output->writeln('<error>Unable to find "diff" installation on your system.</error>');
|
||||||
|
return self::INVALID;
|
||||||
|
}
|
||||||
|
|
||||||
|
$parser_from = $parsers[$input->getArgument('from')];
|
||||||
|
$parser_to = $parsers[$input->getArgument('to')];
|
||||||
|
$tmp_from = tempnam(sys_get_temp_dir(), 'froxlor_config_diff_from');
|
||||||
|
$tmp_to = tempnam(sys_get_temp_dir(), 'froxlor_config_diff_to');
|
||||||
|
$files = [];
|
||||||
|
$titles_by_key = [];
|
||||||
|
|
||||||
|
// Aggregate content for each config file
|
||||||
|
foreach ([[$parser_from, 'from'], [$parser_to, 'to']] as $todo) {
|
||||||
|
foreach ($todo[0]->getServices() as $service_type => $service) {
|
||||||
|
foreach ($service->getDaemons() as $daemon_name => $daemon) {
|
||||||
|
foreach ($daemon->getConfig() as $instruction) {
|
||||||
|
if ($instruction['type'] !== 'file') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($instruction['subcommands'])) {
|
||||||
|
foreach ($instruction['subcommands'] as $subinstruction) {
|
||||||
|
if ($subinstruction['type'] !== 'file') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$content = $subinstruction['content'];
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$content = $instruction['content'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isset($content)) {
|
||||||
|
throw new \Exception("Cannot find content for {$instruction['name']}");
|
||||||
|
}
|
||||||
|
|
||||||
|
$key = "{$service_type}_{$daemon_name}_{$instruction['name']}";
|
||||||
|
$titles_by_key[$key] = "{$service->title} : {$daemon->title} : {$instruction['name']}";
|
||||||
|
if (!isset($files[$key])) {
|
||||||
|
$files[$key] = ['from' => '', 'to' => ''];
|
||||||
|
}
|
||||||
|
$files[$key][$todo[1]] = $this->filterContent($content);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ksort($files);
|
||||||
|
|
||||||
|
$diff_params = '';
|
||||||
|
if ($input->hasOption('diff-params') && trim($input->getOption('diff-params')) !== '') {
|
||||||
|
$diff_params = trim($input->getOption('diff-params'));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Run diff on each file and output, if anything changed
|
||||||
|
foreach ($files as $file_key => $content) {
|
||||||
|
file_put_contents($tmp_from, $content['from']);
|
||||||
|
file_put_contents($tmp_to, $content['to']);
|
||||||
|
$diff_output = FileDir::safe_exec("{$check_diff_installed[0]} {$diff_params} {$tmp_from} {$tmp_to}");
|
||||||
|
|
||||||
|
if (count($diff_output) === 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$output->writeln('<info># ' . $titles_by_key[$file_key] . '</info>');
|
||||||
|
$output->writeln(implode("\n", $diff_output) . "\n");
|
||||||
|
unset($diff_output);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Remove tmp files again
|
||||||
|
unlink($tmp_from);
|
||||||
|
unlink($tmp_to);
|
||||||
|
|
||||||
|
return self::SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
private function filterContent(string $content): string
|
||||||
|
{
|
||||||
|
$new_content = '';
|
||||||
|
|
||||||
|
foreach (explode("\n", $content) as $n) {
|
||||||
|
$n = trim($n);
|
||||||
|
if (!$n) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (str_starts_with($n, '#')) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$new_content .= $n . "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
return $new_content;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -236,9 +236,12 @@ class AcmeSh extends FroxlorCron
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function checkFsFilesAreNewer($domain, $cert_date = 0)
|
private static function checkFsFilesAreNewer($domain, $cert_date = 0): bool
|
||||||
{
|
{
|
||||||
$certificate_folder = self::getWorkingDirFromEnv(strtolower($domain));
|
$certificate_folder = self::getCertificateFolder(strtolower($domain));
|
||||||
|
if (empty($certificate_folder)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
$ssl_file = FileDir::makeCorrectFile($certificate_folder . '/' . strtolower($domain) . '.cer');
|
$ssl_file = FileDir::makeCorrectFile($certificate_folder . '/' . strtolower($domain) . '.cer');
|
||||||
|
|
||||||
if (is_dir($certificate_folder) && file_exists($ssl_file) && is_readable($ssl_file)) {
|
if (is_dir($certificate_folder) && file_exists($ssl_file) && is_readable($ssl_file)) {
|
||||||
@@ -250,9 +253,13 @@ class AcmeSh extends FroxlorCron
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getWorkingDirFromEnv($domain = "", $forced_noecc = false)
|
public static function getWorkingDirFromEnv($domain = "", $forced_ecc = false): string
|
||||||
{
|
{
|
||||||
if (Settings::Get('system.leecc') > 0 && !$forced_noecc) {
|
// first try without _ecc either if it's enabled currently or not as
|
||||||
|
// it might have been at some point so there is a chance we have certificates
|
||||||
|
// with and without _ecc - the method getCertificateFolder() will check both
|
||||||
|
// possibilities
|
||||||
|
if ($forced_ecc) {
|
||||||
$domain .= "_ecc";
|
$domain .= "_ecc";
|
||||||
}
|
}
|
||||||
$env_file = FileDir::makeCorrectFile(dirname(self::getAcmeSh()) . '/acme.sh.env');
|
$env_file = FileDir::makeCorrectFile(dirname(self::getAcmeSh()) . '/acme.sh.env');
|
||||||
@@ -262,7 +269,7 @@ class AcmeSh extends FroxlorCron
|
|||||||
cut -d'"' -f2
|
cut -d'"' -f2
|
||||||
EOC;
|
EOC;
|
||||||
exec('grep "LE_WORKING_DIR" ' . escapeshellarg($env_file) . ' | ' . $cut, $output);
|
exec('grep "LE_WORKING_DIR" ' . escapeshellarg($env_file) . ' | ' . $cut, $output);
|
||||||
if (is_array($output) && !empty($output) && isset($output[0]) && !empty($output[0])) {
|
if (is_array($output) && !empty($output) && !empty($output[0])) {
|
||||||
return FileDir::makeCorrectDir($output[0] . "/" . $domain);
|
return FileDir::makeCorrectDir($output[0] . "/" . $domain);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -635,35 +642,21 @@ EOC;
|
|||||||
*/
|
*/
|
||||||
private static function readCertificateToVar($domain, &$return, &$cronlog)
|
private static function readCertificateToVar($domain, &$return, &$cronlog)
|
||||||
{
|
{
|
||||||
$certificate_folder = self::getWorkingDirFromEnv($domain);
|
$certificate_folder = self::getCertificateFolder($domain);
|
||||||
$certificate_folder_noecc = null;
|
|
||||||
if (Settings::Get('system.leecc') > 0) {
|
|
||||||
$certificate_folder_noecc = self::getWorkingDirFromEnv($domain, true);
|
|
||||||
}
|
|
||||||
$certificate_folder = FileDir::makeCorrectDir($certificate_folder);
|
|
||||||
|
|
||||||
if (is_dir($certificate_folder) || is_dir($certificate_folder_noecc)) {
|
if (!empty($certificate_folder)) {
|
||||||
foreach (
|
$certificate_files = [
|
||||||
[
|
'crt' => $domain . '.cer',
|
||||||
'crt' => $domain . '.cer',
|
'key' => $domain . '.key',
|
||||||
'key' => $domain . '.key',
|
'chain' => 'ca.cer',
|
||||||
'chain' => 'ca.cer',
|
'fullchain' => 'fullchain.cer',
|
||||||
'fullchain' => 'fullchain.cer',
|
'csr' => $domain . '.csr'
|
||||||
'csr' => $domain . '.csr'
|
];
|
||||||
] as $index => $sslfile
|
foreach ($certificate_files as $index => $sslfile) {
|
||||||
) {
|
|
||||||
$ssl_file = FileDir::makeCorrectFile($certificate_folder . '/' . $sslfile);
|
$ssl_file = FileDir::makeCorrectFile($certificate_folder . '/' . $sslfile);
|
||||||
if (file_exists($ssl_file)) {
|
if (file_exists($ssl_file)) {
|
||||||
$return[$index] = file_get_contents($ssl_file);
|
$return[$index] = file_get_contents($ssl_file);
|
||||||
} else {
|
} else {
|
||||||
if (!empty($certificate_folder_noecc)) {
|
|
||||||
$ssl_file_fb = FileDir::makeCorrectFile($certificate_folder_noecc . '/' . $sslfile);
|
|
||||||
if (file_exists($ssl_file_fb)) {
|
|
||||||
$cronlog->logAction(FroxlorLogger::CRON_ACTION, LOG_WARNING, "ECC certificates activated but found only non-ecc file");
|
|
||||||
$return[$index] = file_get_contents($ssl_file_fb);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$cronlog->logAction(FroxlorLogger::CRON_ACTION, LOG_ERR, "Could not find file '" . $sslfile . "' in '" . $certificate_folder . "'");
|
$cronlog->logAction(FroxlorLogger::CRON_ACTION, LOG_ERR, "Could not find file '" . $sslfile . "' in '" . $certificate_folder . "'");
|
||||||
$return[$index] = null;
|
$return[$index] = null;
|
||||||
}
|
}
|
||||||
@@ -672,4 +665,18 @@ EOC;
|
|||||||
$cronlog->logAction(FroxlorLogger::CRON_ACTION, LOG_ERR, "Could not find certificate-folder '" . $certificate_folder . "'");
|
$cronlog->logAction(FroxlorLogger::CRON_ACTION, LOG_ERR, "Could not find certificate-folder '" . $certificate_folder . "'");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static function getCertificateFolder(string $domain): string
|
||||||
|
{
|
||||||
|
$certificate_folder = self::getWorkingDirFromEnv(strtolower($domain));
|
||||||
|
if (file_exists($certificate_folder)) {
|
||||||
|
return $certificate_folder;
|
||||||
|
}
|
||||||
|
$certificate_folder_ecc = self::getWorkingDirFromEnv($domain, true);
|
||||||
|
if (file_exists($certificate_folder_ecc)) {
|
||||||
|
return $certificate_folder_ecc;
|
||||||
|
}
|
||||||
|
FroxlorLogger::getInstanceOf()->logAction(FroxlorLogger::CRON_ACTION, LOG_ERR, "Could not find certificate-folder for domain '" . $domain . "'");
|
||||||
|
return "";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -225,7 +225,7 @@ class Nginx extends HttpConfigBase
|
|||||||
$this->nginx_data[$vhost_filename] .= "\t" . '}' . "\n";
|
$this->nginx_data[$vhost_filename] .= "\t" . '}' . "\n";
|
||||||
|
|
||||||
// protect bin/
|
// protect bin/
|
||||||
$this->nginx_data[$vhost_filename] .= "\t" . 'location ~ ' . rtrim($relpath, "/") . '/(bin|cache|logs|tests|vendor) {' . "\n";
|
$this->nginx_data[$vhost_filename] .= "\t" . 'location ~ ^' . rtrim($relpath, "/") . '/(bin|cache|logs|tests|vendor) {' . "\n";
|
||||||
$this->nginx_data[$vhost_filename] .= "\t" . ' deny all;' . "\n";
|
$this->nginx_data[$vhost_filename] .= "\t" . ' deny all;' . "\n";
|
||||||
$this->nginx_data[$vhost_filename] .= "\t" . '}' . "\n";
|
$this->nginx_data[$vhost_filename] .= "\t" . '}' . "\n";
|
||||||
}
|
}
|
||||||
@@ -883,13 +883,7 @@ class Nginx extends HttpConfigBase
|
|||||||
// remove comments
|
// remove comments
|
||||||
$vhost = implode("\n", preg_replace('/^(\s+)?#(.*)$/', '', explode("\n", $vhost)));
|
$vhost = implode("\n", preg_replace('/^(\s+)?#(.*)$/', '', explode("\n", $vhost)));
|
||||||
// Break blocks into lines
|
// Break blocks into lines
|
||||||
$vhost = str_replace([
|
$vhost = preg_replace("/^(\s+)?location(.+)\{(.+)\}$/misU", "location $2 {\n $3 \n}", $vhost);
|
||||||
"{",
|
|
||||||
"}"
|
|
||||||
], [
|
|
||||||
" {\n",
|
|
||||||
"\n}"
|
|
||||||
], $vhost);
|
|
||||||
// Break into array items
|
// Break into array items
|
||||||
$vhost = explode("\n", preg_replace('/[ \t]+/', ' ', trim(preg_replace('/\t+/', '', $vhost))));
|
$vhost = explode("\n", preg_replace('/[ \t]+/', ' ', trim(preg_replace('/\t+/', '', $vhost))));
|
||||||
// Remove empty lines
|
// Remove empty lines
|
||||||
|
|||||||
@@ -25,10 +25,10 @@
|
|||||||
|
|
||||||
namespace Froxlor;
|
namespace Froxlor;
|
||||||
|
|
||||||
use Froxlor\Database\Database;
|
|
||||||
use Froxlor\UI\Collection;
|
|
||||||
use Froxlor\Api\Commands\Customers;
|
use Froxlor\Api\Commands\Customers;
|
||||||
use Froxlor\Api\Commands\SubDomains;
|
use Froxlor\Api\Commands\SubDomains;
|
||||||
|
use Froxlor\Database\Database;
|
||||||
|
use Froxlor\UI\Collection;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class to manage the current user / session
|
* Class to manage the current user / session
|
||||||
@@ -151,9 +151,13 @@ class CurrentUser
|
|||||||
]);
|
]);
|
||||||
$addition = $result['emaildomains'] != 0;
|
$addition = $result['emaildomains'] != 0;
|
||||||
} elseif ($resource == 'subdomains') {
|
} elseif ($resource == 'subdomains') {
|
||||||
$parentDomainCollection = (new Collection(SubDomains::class, $_SESSION['userinfo'],
|
if (Settings::IsInList('panel.customer_hide_options', 'domains')) {
|
||||||
['sql_search' => ['d.parentdomainid' => 0]]));
|
$addition = false;
|
||||||
$addition = $parentDomainCollection != 0;
|
} else {
|
||||||
|
$parentDomainCollection = (new Collection(SubDomains::class, $_SESSION['userinfo'],
|
||||||
|
['sql_search' => ['d.parentdomainid' => 0]]));
|
||||||
|
$addition = $parentDomainCollection->count() != 0;
|
||||||
|
}
|
||||||
} elseif ($resource == 'domains') {
|
} elseif ($resource == 'domains') {
|
||||||
$customerCollection = (new Collection(Customers::class, $_SESSION['userinfo']));
|
$customerCollection = (new Collection(Customers::class, $_SESSION['userinfo']));
|
||||||
$addition = $customerCollection != 0;
|
$addition = $customerCollection != 0;
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ class IpAddr
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array
|
* @return array
|
||||||
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function getSslIpPortCombinations(): array
|
public static function getSslIpPortCombinations(): array
|
||||||
{
|
{
|
||||||
@@ -75,7 +76,7 @@ class IpAddr
|
|||||||
$additional_conditions_params = [];
|
$additional_conditions_params = [];
|
||||||
$additional_conditions_array = [];
|
$additional_conditions_array = [];
|
||||||
|
|
||||||
if ($userinfo['ip'] != '-1') {
|
if (!empty($userinfo) && $userinfo['ip'] != '-1') {
|
||||||
$admin_ip_stmt = Database::prepare("
|
$admin_ip_stmt = Database::prepare("
|
||||||
SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `id` = IN (:ipid)
|
SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `id` = IN (:ipid)
|
||||||
");
|
");
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ final class Froxlor
|
|||||||
{
|
{
|
||||||
|
|
||||||
// Main version variable
|
// Main version variable
|
||||||
const VERSION = '2.0.20';
|
const VERSION = '2.0.24';
|
||||||
|
|
||||||
// Database version (YYYYMMDDC where C is a daily counter)
|
// Database version (YYYYMMDDC where C is a daily counter)
|
||||||
const DBVERSION = '202304260';
|
const DBVERSION = '202304260';
|
||||||
|
|||||||
@@ -448,7 +448,11 @@ class Core
|
|||||||
$reload = "service php" . PHP_MAJOR_VERSION . "." . PHP_MINOR_VERSION . "-fpm restart";
|
$reload = "service php" . PHP_MAJOR_VERSION . "." . PHP_MINOR_VERSION . "-fpm restart";
|
||||||
$config_dir = "/etc/php/" . PHP_MAJOR_VERSION . "." . PHP_MINOR_VERSION . "/fpm/pool.d/";
|
$config_dir = "/etc/php/" . PHP_MAJOR_VERSION . "." . PHP_MINOR_VERSION . "/fpm/pool.d/";
|
||||||
// fcgid
|
// fcgid
|
||||||
$binary = "/usr/bin/php" . PHP_MAJOR_VERSION . "." . PHP_MINOR_VERSION . "-cgi";
|
if ($this->validatedData['distribution'] == 'bookworm') {
|
||||||
|
$binary = "/usr/bin/php-cgi" . PHP_MAJOR_VERSION . "." . PHP_MINOR_VERSION;
|
||||||
|
} else {
|
||||||
|
$binary = "/usr/bin/php" . PHP_MAJOR_VERSION . "." . PHP_MINOR_VERSION . "-cgi";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$db_user->query("UPDATE `" . TABLE_PANEL_FPMDAEMONS . "` SET `reload_cmd` = '" . $reload . "', `config_dir` = '" . $config_dir . "' WHERE `id` ='1';");
|
$db_user->query("UPDATE `" . TABLE_PANEL_FPMDAEMONS . "` SET `reload_cmd` = '" . $reload . "', `config_dir` = '" . $config_dir . "' WHERE `id` ='1';");
|
||||||
$db_user->query("UPDATE `" . TABLE_PANEL_PHPCONFIGS . "` SET `binary` = '" . $binary . "';");
|
$db_user->query("UPDATE `" . TABLE_PANEL_PHPCONFIGS . "` SET `binary` = '" . $binary . "';");
|
||||||
|
|||||||
@@ -449,7 +449,15 @@ class PhpHelper
|
|||||||
'ssl_specialsettings',
|
'ssl_specialsettings',
|
||||||
'default_vhostconf_domain',
|
'default_vhostconf_domain',
|
||||||
'ssl_default_vhostconf_domain',
|
'ssl_default_vhostconf_domain',
|
||||||
'filecontent'
|
'filecontent',
|
||||||
|
'admin_password',
|
||||||
|
'password',
|
||||||
|
'new_customer_password',
|
||||||
|
'privileged_password',
|
||||||
|
'email_password',
|
||||||
|
'directory_password',
|
||||||
|
'ftp_password',
|
||||||
|
'mysql_password',
|
||||||
];
|
];
|
||||||
if (!empty($global)) {
|
if (!empty($global)) {
|
||||||
$tmp = $global;
|
$tmp = $global;
|
||||||
|
|||||||
@@ -290,7 +290,8 @@ class UI
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function validateThemeTemplate(string $name, string $theme = "") {
|
public static function validateThemeTemplate(string $name, string $theme = "")
|
||||||
|
{
|
||||||
if (empty(trim($theme))) {
|
if (empty(trim($theme))) {
|
||||||
$theme = self::getTheme();
|
$theme = self::getTheme();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -260,7 +260,7 @@ class Validate
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns if an emailaddress is in correct format or not
|
* Returns if an email-address is in correct format or not
|
||||||
*
|
*
|
||||||
* @param string $email The email address to check
|
* @param string $email The email address to check
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -2600,7 +2600,6 @@ ServerName "<SERVERNAME> FTP Server"
|
|||||||
ServerType standalone
|
ServerType standalone
|
||||||
DeferWelcome off
|
DeferWelcome off
|
||||||
|
|
||||||
MultilineRFC2228 on
|
|
||||||
DefaultServer on
|
DefaultServer on
|
||||||
ShowSymlinks on
|
ShowSymlinks on
|
||||||
|
|
||||||
@@ -2939,7 +2938,6 @@ SQLNamedQuery get-quota-limit SELECT "ftp_users.username AS name, ftp_quotalimit
|
|||||||
SQLNamedQuery get-quota-tally SELECT "name, quota_type, bytes_in_used,bytes_out_used, bytes_xfer_used, files_in_used, files_out_used,files_xfer_used FROM ftp_quotatallies WHERE name = '%{0}' AND quota_type = '%{1}'"
|
SQLNamedQuery get-quota-tally SELECT "name, quota_type, bytes_in_used,bytes_out_used, bytes_xfer_used, files_in_used, files_out_used,files_xfer_used FROM ftp_quotatallies WHERE name = '%{0}' AND quota_type = '%{1}'"
|
||||||
SQLNamedQuery update-quota-tally UPDATE "bytes_in_used = bytes_in_used + %{0}, bytes_out_used = bytes_out_used + %{1}, bytes_xfer_used = bytes_xfer_used + %{2}, files_in_used = files_in_used + %{3}, files_out_used= files_out_used + %{4}, files_xfer_used = files_xfer_used + %{5} WHERE name= '%{6}' AND quota_type = '%{7}'" ftp_quotatallies
|
SQLNamedQuery update-quota-tally UPDATE "bytes_in_used = bytes_in_used + %{0}, bytes_out_used = bytes_out_used + %{1}, bytes_xfer_used = bytes_xfer_used + %{2}, files_in_used = files_in_used + %{3}, files_out_used= files_out_used + %{4}, files_xfer_used = files_xfer_used + %{5} WHERE name= '%{6}' AND quota_type = '%{7}'" ftp_quotatallies
|
||||||
SQLNamedQuery insert-quota-tally INSERT "%{0}, %{1}, %{2}, %{3}, %{4},%{5}, %{6}, %{7}" ftp_quotatallies
|
SQLNamedQuery insert-quota-tally INSERT "%{0}, %{1}, %{2}, %{3}, %{4},%{5}, %{6}, %{7}" ftp_quotatallies
|
||||||
|
|
||||||
</IfModule>
|
</IfModule>
|
||||||
]]>
|
]]>
|
||||||
</content>
|
</content>
|
||||||
@@ -2955,7 +2953,7 @@ TLSRSACertificateFile /etc/ssl/certs/proftpd.crt
|
|||||||
TLSRSACertificateKeyFile /etc/ssl/private/proftpd.key
|
TLSRSACertificateKeyFile /etc/ssl/private/proftpd.key
|
||||||
TLSECCertificateFile /etc/ssl/certs/proftpd_ec.crt
|
TLSECCertificateFile /etc/ssl/certs/proftpd_ec.crt
|
||||||
TLSECCertificateKeyFile /etc/ssl/private/proftpd_ec.key
|
TLSECCertificateKeyFile /etc/ssl/private/proftpd_ec.key
|
||||||
TLSOptions NoCertRequest NoSessionReuseRequired
|
TLSOptions NoSessionReuseRequired
|
||||||
TLSVerifyClient off
|
TLSVerifyClient off
|
||||||
|
|
||||||
# Are clients required to use FTP over TLS when talking to this server?
|
# Are clients required to use FTP over TLS when talking to this server?
|
||||||
@@ -3317,7 +3315,7 @@ aliases: files
|
|||||||
<command><![CDATA[mkdir -p {{settings.system.mod_fcgid_configdir}}]]></command>
|
<command><![CDATA[mkdir -p {{settings.system.mod_fcgid_configdir}}]]></command>
|
||||||
<command><![CDATA[mkdir -p {{settings.system.mod_fcgid_tmpdir}}]]></command>
|
<command><![CDATA[mkdir -p {{settings.system.mod_fcgid_tmpdir}}]]></command>
|
||||||
<command><![CDATA[chmod 1777 {{settings.system.mod_fcgid_tmpdir}}]]></command>
|
<command><![CDATA[chmod 1777 {{settings.system.mod_fcgid_tmpdir}}]]></command>
|
||||||
<command><![CDATA[a2dismod php8.1]]></command>
|
<command><![CDATA[a2dismod php8.2]]></command>
|
||||||
</commands>
|
</commands>
|
||||||
<!-- instead of just restarting apache, we let the cronjob do all the
|
<!-- instead of just restarting apache, we let the cronjob do all the
|
||||||
dirty work -->
|
dirty work -->
|
||||||
@@ -3350,7 +3348,7 @@ aliases: files
|
|||||||
</visibility>
|
</visibility>
|
||||||
<visibility mode="true">{{settings.phpfpm.enabled_ownvhost}}
|
<visibility mode="true">{{settings.phpfpm.enabled_ownvhost}}
|
||||||
</visibility>
|
</visibility>
|
||||||
<command><![CDATA[a2dismod php8.1]]></command>
|
<command><![CDATA[a2dismod php8.2]]></command>
|
||||||
</commands>
|
</commands>
|
||||||
<!-- instead of just restarting apache, we let the cronjob do all the
|
<!-- instead of just restarting apache, we let the cronjob do all the
|
||||||
dirty work -->
|
dirty work -->
|
||||||
|
|||||||
15
lib/init.php
15
lib/init.php
@@ -181,8 +181,10 @@ if (@file_exists('templates/' . $theme . '/config.json')) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// check for existence of variant in theme
|
// check for existence of variant in theme
|
||||||
if (is_array($_themeoptions) && (!array_key_exists('variants', $_themeoptions) || !array_key_exists($themevariant,
|
if (is_array($_themeoptions) && (!array_key_exists('variants', $_themeoptions) || !array_key_exists(
|
||||||
$_themeoptions['variants']))) {
|
$themevariant,
|
||||||
|
$_themeoptions['variants']
|
||||||
|
))) {
|
||||||
$themevariant = "default";
|
$themevariant = "default";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -216,12 +218,11 @@ UI::twig()->addGlobal('header_logo', $header_logo);
|
|||||||
if (!CurrentUser::hasSession() && AREA != 'login') {
|
if (!CurrentUser::hasSession() && AREA != 'login') {
|
||||||
unset($_SESSION['userinfo']);
|
unset($_SESSION['userinfo']);
|
||||||
CurrentUser::setData();
|
CurrentUser::setData();
|
||||||
session_destroy();
|
$_SESSION = [
|
||||||
$params = [
|
"lastscript" => basename($_SERVER["SCRIPT_NAME"]),
|
||||||
"script" => basename($_SERVER["SCRIPT_NAME"]),
|
"lastqrystr" => $_SERVER["QUERY_STRING"]
|
||||||
"qrystr" => $_SERVER["QUERY_STRING"]
|
|
||||||
];
|
];
|
||||||
Response::redirectTo('index.php', $params);
|
Response::redirectTo('index.php');
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ return [
|
|||||||
'url' => 'customer_email.php?page=emails',
|
'url' => 'customer_email.php?page=emails',
|
||||||
'label' => lng('menue.email.emails'),
|
'label' => lng('menue.email.emails'),
|
||||||
'required_resources' => 'emails',
|
'required_resources' => 'emails',
|
||||||
'add_shortlink' => CurrentUser::canAddResource('emails') ? 'customer_email.php?page=emails&action=add' : null,
|
'add_shortlink' => !CurrentUser::isAdmin() && CurrentUser::canAddResource('emails') ? 'customer_email.php?page=email_domain&action=add' : null,
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'url' => Settings::Get('panel.webmail_url'),
|
'url' => Settings::Get('panel.webmail_url'),
|
||||||
@@ -60,7 +60,7 @@ return [
|
|||||||
'url' => 'customer_mysql.php?page=mysqls',
|
'url' => 'customer_mysql.php?page=mysqls',
|
||||||
'label' => lng('menue.mysql.databases'),
|
'label' => lng('menue.mysql.databases'),
|
||||||
'required_resources' => 'mysqls',
|
'required_resources' => 'mysqls',
|
||||||
'add_shortlink' => CurrentUser::canAddResource('mysqls')? 'customer_mysql.php?page=mysqls&action=add' : null,
|
'add_shortlink' => !CurrentUser::isAdmin() && CurrentUser::canAddResource('mysqls')? 'customer_mysql.php?page=mysqls&action=add' : null,
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'url' => Settings::Get('panel.phpmyadmin_url'),
|
'url' => Settings::Get('panel.phpmyadmin_url'),
|
||||||
@@ -81,7 +81,7 @@ return [
|
|||||||
[
|
[
|
||||||
'url' => 'customer_domains.php?page=domains',
|
'url' => 'customer_domains.php?page=domains',
|
||||||
'label' => lng('menue.domains.settings'),
|
'label' => lng('menue.domains.settings'),
|
||||||
'add_shortlink' => CurrentUser::canAddResource('subdomains') ? 'customer_domains.php?page=domains&action=add' : null,
|
'add_shortlink' => !CurrentUser::isAdmin() && CurrentUser::canAddResource('subdomains') ? 'customer_domains.php?page=domains&action=add' : null,
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'url' => 'customer_domains.php?page=sslcertificates',
|
'url' => 'customer_domains.php?page=sslcertificates',
|
||||||
@@ -98,7 +98,7 @@ return [
|
|||||||
[
|
[
|
||||||
'url' => 'customer_ftp.php?page=accounts',
|
'url' => 'customer_ftp.php?page=accounts',
|
||||||
'label' => lng('menue.ftp.accounts'),
|
'label' => lng('menue.ftp.accounts'),
|
||||||
'add_shortlink' => CurrentUser::canAddResource('ftps') ? 'customer_ftp.php?page=accounts&action=add' : null,
|
'add_shortlink' => !CurrentUser::isAdmin() && CurrentUser::canAddResource('ftps') ? 'customer_ftp.php?page=accounts&action=add' : null,
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'url' => Settings::Get('panel.webftp_url'),
|
'url' => Settings::Get('panel.webftp_url'),
|
||||||
|
|||||||
2406
lng/ca.lng.php
Normal file
2406
lng/ca.lng.php
Normal file
File diff suppressed because it is too large
Load Diff
@@ -34,6 +34,7 @@ return [
|
|||||||
'pt' => 'Portuguese',
|
'pt' => 'Portuguese',
|
||||||
'se' => 'Swedish',
|
'se' => 'Swedish',
|
||||||
'es' => 'Spanish',
|
'es' => 'Spanish',
|
||||||
|
'ca' => 'Catalan',
|
||||||
],
|
],
|
||||||
'2fa' => [
|
'2fa' => [
|
||||||
'2fa' => '2FA options',
|
'2fa' => '2FA options',
|
||||||
@@ -1263,7 +1264,7 @@ Yours sincerely, your administrator',
|
|||||||
'reset' => 'Discard changes',
|
'reset' => 'Discard changes',
|
||||||
'pathDescription' => 'If the directory doesn\'t exist, it will be created automatically.',
|
'pathDescription' => 'If the directory doesn\'t exist, it will be created automatically.',
|
||||||
'pathDescriptionEx' => '<br /><br /><span class="text-danger">Please note:</span> The path <code>/</code> is not allowed due to administrative settings, it will automatically be set to <code>/chosen.subdomain.tld/</code> if not set to another directory.',
|
'pathDescriptionEx' => '<br /><br /><span class="text-danger">Please note:</span> The path <code>/</code> is not allowed due to administrative settings, it will automatically be set to <code>/chosen.subdomain.tld/</code> if not set to another directory.',
|
||||||
'pathDescriptionSubdomain' => 'If the directory doesn\'t exist, it will be created automatically.<br /><br />If you want a redirect to another domain than this entry has to start with http:// or https://.<br /><br />If the URL ends with / it is considered a folder, if not, it is treated as file.',
|
'pathDescriptionSubdomain' => 'If the directory doesn\'t exist, it will be created automatically.<br /><br />If you want a redirect to another domain then this entry has to start with http:// or https://.<br /><br />If the URL ends with / it is considered a folder, if not, it is treated as file.',
|
||||||
'back' => 'Back',
|
'back' => 'Back',
|
||||||
'reseller' => 'reseller',
|
'reseller' => 'reseller',
|
||||||
'admin' => 'admin',
|
'admin' => 'admin',
|
||||||
|
|||||||
10455
package-lock.json
generated
10455
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
5
scripts/froxlor_master_cronjob.php
Normal file
5
scripts/froxlor_master_cronjob.php
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<?php
|
||||||
|
chmod('/app//bin/froxlor-cli', 0755);
|
||||||
|
// re-create cron.d configuration file
|
||||||
|
exec('/app//bin/froxlor-cli froxlor:cron -r 99');
|
||||||
|
exit;
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
<form class="col-12 max-w-420 d-flex flex-column" method="post" enctype="application/x-www-form-urlencoded">
|
<form action="{{ formaction }}" class="col-12 max-w-420 d-flex flex-column" method="post" enctype="application/x-www-form-urlencoded">
|
||||||
<img class="align-self-center my-5" src="{{ header_logo_login }}" alt="Froxlor Server Management Panel"/>
|
<img class="align-self-center my-5" src="{{ header_logo_login }}" alt="Froxlor Server Management Panel"/>
|
||||||
|
|
||||||
<div class="card shadow">
|
<div class="card shadow">
|
||||||
@@ -38,8 +38,6 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card-body d-grid gap-2">
|
<div class="card-body d-grid gap-2">
|
||||||
<input type="hidden" name="action" value="{{ action }}"/>
|
|
||||||
<input type="hidden" name="send" value="send"/>
|
|
||||||
<button class="btn btn-primary rounded-top-0" type="submit" name="doremind">{{ lng('login.remind') }}</button>
|
<button class="btn btn-primary rounded-top-0" type="submit" name="doremind">{{ lng('login.remind') }}</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -39,9 +39,6 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card-body d-grid gap-2">
|
<div class="card-body d-grid gap-2">
|
||||||
<input type="hidden" name="script" value="{{ lastscript }}"/>
|
|
||||||
<input type="hidden" name="qrystr" value="{{ lastqrystr|raw }}"/>
|
|
||||||
<input type="hidden" name="send" value="send"/>
|
|
||||||
<button class="btn btn-primary rounded-top-0" type="submit" name="dologin">{{ lng('login.login') }}</button>
|
<button class="btn btn-primary rounded-top-0" type="submit" name="dologin">{{ lng('login.login') }}</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -30,8 +30,6 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card-body d-grid gap-2">
|
<div class="card-body d-grid gap-2">
|
||||||
<input type="hidden" name="action" value="resetpwd"/>
|
|
||||||
<input type="hidden" name="send" value="send"/>
|
|
||||||
<button class="btn btn-primary rounded-top-0" type="submit" name="doremind">{{ lng('login.remind') }}</button>
|
<button class="btn btn-primary rounded-top-0" type="submit" name="doremind">{{ lng('login.remind') }}</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
26
templates/Maketank/2fa/entercode.tpl
Normal file
26
templates/Maketank/2fa/entercode.tpl
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
$header
|
||||||
|
<article class="login bradius">
|
||||||
|
<header class="dark">
|
||||||
|
<img src="{$header_logo}" alt="Froxlor Server Management Panel" />
|
||||||
|
</header>
|
||||||
|
<section class="loginsec">
|
||||||
|
<form method="post" action="{$filename}" enctype="application/x-www-form-urlencoded">
|
||||||
|
<fieldset>
|
||||||
|
<legend>Froxlor - {$lng['login']['2fa']}</legend>
|
||||||
|
<p>
|
||||||
|
<label for="2fa_code">{$lng['login']['2facode']}:</label>
|
||||||
|
<input type="text" name="2fa_code" id="2fa_code" value="" autofocus required/>
|
||||||
|
</p>
|
||||||
|
<p class="submit">
|
||||||
|
<input type="hidden" name="action" value="2fa_verify" />
|
||||||
|
<input type="hidden" name="send" value="send" />
|
||||||
|
<input type="submit" value="{$lng['2fa']['2fa_verify']}" />
|
||||||
|
</p>
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
<aside>
|
||||||
|
<a href="index.php">{$lng['login']['backtologin']}</a>
|
||||||
|
</aside>
|
||||||
|
</section>
|
||||||
|
</article>
|
||||||
|
$footer
|
||||||
43
templates/Maketank/2fa/overview.tpl
Normal file
43
templates/Maketank/2fa/overview.tpl
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
$header
|
||||||
|
<article>
|
||||||
|
<header>
|
||||||
|
<h2>
|
||||||
|
<img src="templates/{$theme}/assets/img/icons/lock_big.png" alt="" />
|
||||||
|
{$lng['login']['2fa']}
|
||||||
|
</h2>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<if $userinfo['type_2fa']=='0'>
|
||||||
|
<form method="post"
|
||||||
|
action="{$linker->getLink(array('section' => 'index', 'page' => $page, 'action' => 'add'))}">
|
||||||
|
<p>{$lng['2fa']['2fa_overview_desc']}</p>
|
||||||
|
<br> <select id="type_2fa" name="type_2fa" class="small">{$type_select}
|
||||||
|
</select> <input type="submit" class="submit"
|
||||||
|
value="{$lng['2fa']['2fa_add']}" name="add" />
|
||||||
|
</form>
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<if $userinfo['type_2fa']=='1'>
|
||||||
|
<form method="post"
|
||||||
|
action="{$linker->getLink(array('section' => 'index', 'page' => $page, 'action' => 'delete'))}">
|
||||||
|
<p>{$lng['2fa']['2fa_email_desc']}</p>
|
||||||
|
<br> <input type="submit" class="cancel"
|
||||||
|
value="{$lng['2fa']['2fa_delete']}" name="delete" />
|
||||||
|
</form>
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<if $userinfo['type_2fa']=='2'>
|
||||||
|
<form method="post"
|
||||||
|
action="{$linker->getLink(array('section' => 'index', 'page' => $page, 'action' => 'delete'))}">
|
||||||
|
<p>{$lng['2fa']['2fa_ga_desc']}</p>
|
||||||
|
<br> <img src="{$ga_qrcode}" alt="QRCode" /><br>
|
||||||
|
<br> <input type="submit" class="cancel"
|
||||||
|
value="{$lng['2fa']['2fa_delete']}" name="delete" />
|
||||||
|
</form>
|
||||||
|
</if>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
$footer
|
||||||
2
templates/Maketank/AUTHORS
Normal file
2
templates/Maketank/AUTHORS
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
created and maintained by Roman Schmerold <BNoiZe@froxlor.org>
|
||||||
|
|
||||||
60
templates/Maketank/admin/admins/admins.tpl
Normal file
60
templates/Maketank/admin/admins/admins.tpl
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
$header
|
||||||
|
<article>
|
||||||
|
<header>
|
||||||
|
<h2>
|
||||||
|
<img src="templates/{$theme}/assets/img/icons/group_edit_big.png" alt="" />
|
||||||
|
{$lng['admin']['admins']} ({$admincount})
|
||||||
|
</h2>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
|
||||||
|
<form action="{$linker->getLink(array('section' => 'admins'))}" method="post" enctype="application/x-www-form-urlencoded">
|
||||||
|
<input type="hidden" name="s" value="$s" />
|
||||||
|
<input type="hidden" name="page" value="$page" />
|
||||||
|
|
||||||
|
<div class="overviewsearch">
|
||||||
|
{$searchcode}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="overviewadd">
|
||||||
|
<img src="templates/{$theme}/assets/img/icons/add.png" alt="" />
|
||||||
|
<a href="{$linker->getLink(array('section' => 'admins', 'page' => $page, 'action' => 'add'))}">{$lng['admin']['admin_add']}</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<table class="full hl">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>{$lng['customer']['name']} {$arrowcode['name']}</th>
|
||||||
|
<th>{$lng['login']['username']} {$arrowcode['loginname']}</th>
|
||||||
|
<th>{$lng['admin']['customers']}</th>
|
||||||
|
<th> </th>
|
||||||
|
<th>{$lng['panel']['options']}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<if $pagingcode != ''>
|
||||||
|
<tfoot>
|
||||||
|
<tr>
|
||||||
|
<td colspan="5">{$pagingcode}</td>
|
||||||
|
</tr>
|
||||||
|
</tfoot>
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<tbody>
|
||||||
|
$admins
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<if 15 < $count >
|
||||||
|
<div class="overviewadd">
|
||||||
|
<img src="templates/{$theme}/assets/img/icons/add.png" alt="" />
|
||||||
|
<a href="{$linker->getLink(array('section' => 'admins', 'page' => $page, 'action' => 'add'))}">{$lng['admin']['admin_add']}</a>
|
||||||
|
</div>
|
||||||
|
</if>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
$footer
|
||||||
35
templates/Maketank/admin/admins/admins_add.tpl
Normal file
35
templates/Maketank/admin/admins/admins_add.tpl
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
$header
|
||||||
|
<article>
|
||||||
|
<header>
|
||||||
|
<h2>
|
||||||
|
<img src="templates/{$theme}/assets/img/icons/user_add_big.png" alt="{$title}" />
|
||||||
|
{$title}
|
||||||
|
</h2>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
|
||||||
|
<form action="{$linker->getLink(array('section' => 'admins'))}" 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">
|
||||||
|
{$admin_add_form}
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
<br />
|
||||||
|
<article>
|
||||||
|
<section>
|
||||||
|
<p>
|
||||||
|
<span class="red">*</span>: {$lng['admin']['valuemandatory']}<br />
|
||||||
|
<span class="red">**</span>: {$lng['admin']['valuemandatorycompany']}
|
||||||
|
</p>
|
||||||
|
</section>
|
||||||
|
</article>
|
||||||
|
$footer
|
||||||
86
templates/Maketank/admin/admins/admins_admin.tpl
Normal file
86
templates/Maketank/admin/admins/admins_admin.tpl
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{$row['name']}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<if $row['adminid'] != $userinfo['userid']>
|
||||||
|
<a href="{$linker->getLink(array('section' => 'admins', 'page' => $page, 'action' => 'su', 'id' => $row['adminid']))}" rel="external">{$row['loginname']}</a>
|
||||||
|
</if>
|
||||||
|
<if $row['adminid'] == $userinfo['userid']>
|
||||||
|
{$row['loginname']}
|
||||||
|
</if>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
{$row['customers_used']}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div>
|
||||||
|
<span class="overviewcustomerextras">
|
||||||
|
<span>Webspace:</span>
|
||||||
|
<if $row['diskspace'] != 'UL'>
|
||||||
|
<if (($row['diskspace']/100)*(int)\Froxlor\Settings::Get('system.report_webmax')) < $row['diskspace_used']>
|
||||||
|
<div class="progress progress-danger tipper" title="{$row['diskspace_used']} MiB {$lng['panel']['used']}, {$row['diskspace']} MiB {$lng['panel']['assigned']}">
|
||||||
|
<div class="bar" aria-valuenow="{$disk_percent}" aria-valuemin="0" aria-valuemax="100"></div>
|
||||||
|
</div>
|
||||||
|
<else>
|
||||||
|
<if (($row['diskspace']/100)*((int)\Froxlor\Settings::Get('system.report_webmax') - 15)) < $row['diskspace_used']>
|
||||||
|
<div class="progress progress-warn tipper" title="{$row['diskspace_used']} MiB {$lng['panel']['used']}, {$row['diskspace']} MiB {$lng['panel']['assigned']}">
|
||||||
|
<div class="bar" aria-valuenow="{$disk_percent}" aria-valuemin="0" aria-valuemax="100"></div>
|
||||||
|
</div>
|
||||||
|
<else>
|
||||||
|
<div class="progress tipper" title="{$row['diskspace_used']} MiB {$lng['panel']['used']}, {$row['diskspace']} MiB {$lng['panel']['assigned']}">
|
||||||
|
<div class="bar" aria-valuenow="{$disk_percent}" aria-valuemin="0" aria-valuemax="100"></div>
|
||||||
|
</div>
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
|
<else>
|
||||||
|
<div class="progress">∞
|
||||||
|
<div class="bar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div>
|
||||||
|
</div>
|
||||||
|
</if>
|
||||||
|
</span>
|
||||||
|
<span class="overviewcustomerextras">
|
||||||
|
<span>Traffic:</span>
|
||||||
|
<if $row['traffic'] != 'UL'>
|
||||||
|
<if (($row['traffic']/100)*(int)\Froxlor\Settings::Get('system.report_trafficmax')) < $row['traffic_used']>
|
||||||
|
<div class="progress progress-danger tipper" title="{$row['traffic_used']} GiB {$lng['panel']['used']}, {$row['traffic']} GiB {$lng['panel']['assigned']}">
|
||||||
|
<div class="bar" aria-valuenow="{$traffic_percent}" aria-valuemin="0" aria-valuemax="100"></div>
|
||||||
|
</div>
|
||||||
|
<else>
|
||||||
|
<if (($row['traffic']/100)*((int)\Froxlor\Settings::Get('system.report_trafficmax') - 15)) < $row['traffic_used']>
|
||||||
|
<div class="progress progress-warn tipper" title="{$row['traffic_used']} GiB {$lng['panel']['used']}, {$row['traffic']} GiB {$lng['panel']['assigned']}">
|
||||||
|
<div class="bar" aria-valuenow="{$traffic_percent}" aria-valuemin="0" aria-valuemax="100"></div>
|
||||||
|
</div>
|
||||||
|
<else>
|
||||||
|
<div class="progress tipper" title="{$row['traffic_used']} GiB {$lng['panel']['used']}, {$row['traffic']} GiB {$lng['panel']['assigned']}">
|
||||||
|
<div class="bar" aria-valuenow="{$traffic_percent}" aria-valuemin="0" aria-valuemax="100"></div>
|
||||||
|
</div>
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
|
<else>
|
||||||
|
<div class="progress">∞
|
||||||
|
<div class="bar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div>
|
||||||
|
</div>
|
||||||
|
</if>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a href="{$linker->getLink(array('section' => 'admins', 'page' => $page, 'action' => 'edit', 'id' => $row['adminid']))}">
|
||||||
|
<img src="templates/{$theme}/assets/img/icons/edit.png" alt="{$lng['panel']['edit']}" title="{$lng['panel']['edit']}" />
|
||||||
|
</a>
|
||||||
|
<a href="{$linker->getLink(array('section' => 'admins', 'page' => $page, 'action' => 'delete', 'id' => $row['adminid']))}">
|
||||||
|
<img src="templates/{$theme}/assets/img/icons/delete.png" alt="{$lng['panel']['delete']}" title="{$lng['panel']['delete']}" />
|
||||||
|
</a>
|
||||||
|
<if $row['custom_notes'] != ''>
|
||||||
|
<img src="templates/{$theme}/assets/img/icons/info.png" class="notes" data-id="{$row['loginname']}" alt="{$lng['usersettings']['custom_notes']['title']}" title="{$lng['usersettings']['custom_notes']['title']}" />
|
||||||
|
</if>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<if $row['custom_notes'] != ''>
|
||||||
|
<tr class="notes_block" id="notes_{$row['loginname']}">
|
||||||
|
<td colspan="5">
|
||||||
|
{$row['custom_notes']}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</if>
|
||||||
41
templates/Maketank/admin/admins/admins_edit.tpl
Normal file
41
templates/Maketank/admin/admins/admins_edit.tpl
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
$header
|
||||||
|
<article>
|
||||||
|
<header>
|
||||||
|
<h2>
|
||||||
|
<img src="templates/{$theme}/assets/img/icons/user_edit_big.png" alt="{$title}" /> {$title}
|
||||||
|
</h2>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<if $result['adminid'] == $userinfo['userid']>
|
||||||
|
<div class="warningcontainer bradius">
|
||||||
|
<div class="warning">{$lng['error']['youcanteditallfieldsofyourself']}</div>
|
||||||
|
</div>
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
|
||||||
|
<form action="{$linker->getLink(array('section' => 'admins'))}" 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="id" value="$id" />
|
||||||
|
<input type="hidden" name="send" value="send" />
|
||||||
|
|
||||||
|
<table class="full">
|
||||||
|
{$admin_edit_form}
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
<br />
|
||||||
|
<article>
|
||||||
|
<section>
|
||||||
|
<p>
|
||||||
|
<span class="red">*</span>: {$lng['admin']['valuemandatory']}
|
||||||
|
</p>
|
||||||
|
</section>
|
||||||
|
</article>
|
||||||
|
$footer
|
||||||
|
|
||||||
22
templates/Maketank/admin/configfiles/choose.tpl
Normal file
22
templates/Maketank/admin/configfiles/choose.tpl
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
$header
|
||||||
|
<article>
|
||||||
|
<header>
|
||||||
|
<h2>
|
||||||
|
<img src="templates/{$theme}/assets/img/icons/settings_big.png" alt="{$lng['admin']['configfiles']['serverconfiguration']}" />
|
||||||
|
{$lng['admin']['configfiles']['serverconfiguration']}
|
||||||
|
[<a href="{$linker->getLink(array('section' => 'configfiles', 'page' => 'configfiles'))}">{$lng['admin']['configfiles']['wizard']}</a>]
|
||||||
|
</h2>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<form action="{$linker->getLink(array('section' => 'configfiles'))}" method="get" enctype="application/x-www-form-urlencoded">
|
||||||
|
<input type="hidden" name="s" value="$s" />
|
||||||
|
<input type="hidden" name="page" value="$page" />
|
||||||
|
|
||||||
|
<table class="tiny center">
|
||||||
|
$distributions
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
</section>
|
||||||
|
</article>
|
||||||
|
$footer
|
||||||
1
templates/Maketank/admin/configfiles/choose_daemon.tpl
Normal file
1
templates/Maketank/admin/configfiles/choose_daemon.tpl
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<li><a href="{$linker->getLink(array('section' => 'configfiles', 'page' => $page, 'distribution' => $distribution_name, 'service' => $service_name, 'daemon' => $daemon_name))}">{$daemon_details['label']}</a></li>
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<tr class="section">
|
||||||
|
<th><strong>{$distribution_details['label']}</strong></th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>$services</td>
|
||||||
|
</tr>
|
||||||
5
templates/Maketank/admin/configfiles/choose_service.tpl
Normal file
5
templates/Maketank/admin/configfiles/choose_service.tpl
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<strong>{$service_details['label']}</strong>
|
||||||
|
<br />
|
||||||
|
<ul>
|
||||||
|
$daemons
|
||||||
|
</ul>
|
||||||
30
templates/Maketank/admin/configfiles/configfiles.tpl
Normal file
30
templates/Maketank/admin/configfiles/configfiles.tpl
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
$header
|
||||||
|
<article>
|
||||||
|
<header>
|
||||||
|
<h2>
|
||||||
|
<img src="templates/{$theme}/assets/img/icons/settings_big.png" alt="" />
|
||||||
|
{$dist_display} »
|
||||||
|
{$services[$service]->title} »
|
||||||
|
{$daemons[$daemon]->title} [<a href="{$linker->getLink(array('section' => 'configfiles', 'page' => $page, 'distribution' => $distribution, 'service' => $service))}">{$lng['panel']['back']}</a>]
|
||||||
|
</h2>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<div class="info">
|
||||||
|
<p>{$lng['admin']['configfiles']['legend']}</p>
|
||||||
|
<p>{$lng['admin']['configfiles']['commands']}</p>
|
||||||
|
<p>{$lng['admin']['configfiles']['files']}</p>
|
||||||
|
<p>
|
||||||
|
<form id="configfiles_setmysqlpw" action="#">
|
||||||
|
FROXLOR_MYSQL_PASSWORD: <input type="text" class="text" id="configfiles_mysqlpw" name="configfiles_mysqlpw" value="" />
|
||||||
|
<input type="submit" value="{$lng['panel']['set']}" />
|
||||||
|
</form>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
{$configpage}
|
||||||
|
</section>
|
||||||
|
</article>
|
||||||
|
$footer
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
<div class="pushbot">
|
||||||
|
<textarea class="shell" rows="{$numbrows}" readonly>{$commands}</textarea>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
<div class="pushbot">
|
||||||
|
<textarea class="shell" rows="1" readonly>{$distro_editor} {$realname}</textarea>
|
||||||
|
<textarea class="filecontent" rows="<if $numbrows <=20 >{$numbrows}<else>21</if>" readonly>{$file_content}</textarea>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
<div class="filesub">
|
||||||
|
<fieldset class="file">
|
||||||
|
<legend>{$realname}</legend>
|
||||||
|
{$commands_pre}
|
||||||
|
{$commands_file}
|
||||||
|
{$commands_post}
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
82
templates/Maketank/admin/configfiles/wizard.tpl
Normal file
82
templates/Maketank/admin/configfiles/wizard.tpl
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
$header
|
||||||
|
<article>
|
||||||
|
<header>
|
||||||
|
<h2>
|
||||||
|
<img src="templates/{$theme}/assets/img/icons/settings_big.png" alt="{$lng['admin']['configfiles']['serverconfiguration']}" />
|
||||||
|
{$lng['admin']['configfiles']['serverconfiguration']}
|
||||||
|
[<a href="{$linker->getLink(array('section' => 'configfiles', 'page' => 'overview'))}">{$lng['admin']['configfiles']['overview']}</a>]
|
||||||
|
</h2>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<div class="messagewrapperfull">
|
||||||
|
<div class="warningcontainer bradius">
|
||||||
|
<div class="warningtitle">{$lng['admin']['warning']}</div>
|
||||||
|
<div class="warning">{$lng['panel']['settings_before_configuration']}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<form action="$filename" method="get" enctype="application/x-www-form-urlencoded">
|
||||||
|
<fieldset>
|
||||||
|
<input type="hidden" name="s" value="$s" />
|
||||||
|
<input type="hidden" name="page" value="$page" />
|
||||||
|
|
||||||
|
<table class="tiny center">
|
||||||
|
<tr>
|
||||||
|
<td><b>{$lng['admin']['configfiles']['distribution']}:</b></td>
|
||||||
|
<td>
|
||||||
|
<if $distribution != ''>
|
||||||
|
<input type="hidden" name="distribution" value="$distribution"/>
|
||||||
|
<a href="{$linker->getLink(array('section' => 'configfiles', 'page' => $page))}">{$dist_display}</a>
|
||||||
|
<else>
|
||||||
|
<select id="config_distribution" name="distribution">
|
||||||
|
<option value="choose">{$lng['admin']['configfiles']['choosedistribution']}</option>
|
||||||
|
{$distributions_select}
|
||||||
|
</select>
|
||||||
|
</if>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><b>{$lng['admin']['configfiles']['service']}:</b></td>
|
||||||
|
<td>
|
||||||
|
<if $service != ''>
|
||||||
|
<input type="hidden" name="service" value="$service"/>
|
||||||
|
<a href="{$linker->getLink(array('section' => 'configfiles', 'page' => $page, 'distribution' => $distribution))}">{$services[$service]->title}</a>
|
||||||
|
<else>
|
||||||
|
<select id="config_service" name="service">
|
||||||
|
<option value="choose">{$lng['admin']['configfiles']['chooseservice']}</option>
|
||||||
|
{$services_select}
|
||||||
|
</select>
|
||||||
|
</if>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><b>{$lng['admin']['configfiles']['daemon']}:</b></td>
|
||||||
|
<td><select id="config_daemon" name="daemon"><option value="choose">{$lng['admin']['configfiles']['choosedaemon']}</option>{$daemons_select}</select></td>
|
||||||
|
</tr>
|
||||||
|
<tfoot>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" align="center"><input class="bottom" type="submit" value="{$lng['panel']['next']}" /></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<if \Froxlor\Settings::Get('panel.is_configured') == '0'>
|
||||||
|
<td colspan="2" align="center">{$lng['panel']['done_configuring']}:<br><br><a href="{$linker->getLink(array('section' => 'configfiles', 'page' => 'overview', 'action' => 'setconfigured'))}" class="btnlink">{$lng['panel']['ihave_configured']}</a><br><br></td>
|
||||||
|
<else>
|
||||||
|
<td colspan="2" align="center">{$lng['panel']['system_is_configured']}</td>
|
||||||
|
</if>
|
||||||
|
</tr>
|
||||||
|
</tfoot>
|
||||||
|
</table>
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<br><br><br>
|
||||||
|
<section>
|
||||||
|
<p><strong>{$lng['panel']['alternative_cmdline_config']}:</strong></p>
|
||||||
|
<div class="pushbot">
|
||||||
|
<textarea class="shell" rows="2" readonly>php {$basedir}/install/scripts/config-services.php --froxlor-dir={$basedir} --create</textarea>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</article>
|
||||||
|
$footer
|
||||||
27
templates/Maketank/admin/cronjobs/cronjob_edit.tpl
Normal file
27
templates/Maketank/admin/cronjobs/cronjob_edit.tpl
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
$header
|
||||||
|
<article>
|
||||||
|
<header>
|
||||||
|
<h2>
|
||||||
|
<img src="templates/{$theme}/assets/img/icons/clock_edit_big.png" alt="{$title}" />
|
||||||
|
{$title}
|
||||||
|
</h2>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
|
||||||
|
<form action="{$linker->getLink(array('section' => 'cronjobs'))}" 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="id" value="$id" />
|
||||||
|
<input type="hidden" name="send" value="send" />
|
||||||
|
|
||||||
|
<table class="full">
|
||||||
|
{$cronjobs_edit_form}
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
$footer
|
||||||
33
templates/Maketank/admin/cronjobs/cronjobs.tpl
Normal file
33
templates/Maketank/admin/cronjobs/cronjobs.tpl
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
$header
|
||||||
|
<article>
|
||||||
|
<header>
|
||||||
|
<h2><img src="templates/{$theme}/assets/img/icons/clock_big.png" alt="" />
|
||||||
|
{$lng['admin']['cron']['cronsettings']}</h2>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<div class="messagewrapperfull">
|
||||||
|
<div class="warningcontainer bradius">
|
||||||
|
<div class="warningtitle">{$lng['admin']['warning']}</div>
|
||||||
|
<div class="warning">{$lng['cron']['changewarning']}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<table class="full">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>{$lng['cron']['description']}</th>
|
||||||
|
<th>{$lng['cron']['lastrun']}</th>
|
||||||
|
<th>{$lng['cron']['interval']}</th>
|
||||||
|
<th>{$lng['cron']['isactive']}</th>
|
||||||
|
<th>{$lng['panel']['options']}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
$crons
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
$footer
|
||||||
11
templates/Maketank/admin/cronjobs/cronjobs_cronjob.tpl
Normal file
11
templates/Maketank/admin/cronjobs/cronjobs_cronjob.tpl
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<tr>
|
||||||
|
<td>{$description}</td>
|
||||||
|
<td>{$row['lastrun']}</td>
|
||||||
|
<td>{$row['interval']}</td>
|
||||||
|
<td>{$row['isactive']}</td>
|
||||||
|
<td>
|
||||||
|
<a href="{$linker->getLink(array('section' => 'cronjobs', '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>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
<tr>
|
||||||
|
<td colspan="5"><b>{$module}</b></td>
|
||||||
|
</tr>
|
||||||
71
templates/Maketank/admin/customers/customers.tpl
Normal file
71
templates/Maketank/admin/customers/customers.tpl
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
$header
|
||||||
|
<article>
|
||||||
|
<header>
|
||||||
|
<h2>
|
||||||
|
<img src="templates/{$theme}/assets/img/icons/group_edit_big.png" alt="" />
|
||||||
|
{$lng['admin']['customers']} ({$customercount})
|
||||||
|
</h2>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
|
||||||
|
<form action="{$linker->getLink(array('section' => 'customers'))}" method="post" enctype="application/x-www-form-urlencoded">
|
||||||
|
<input type="hidden" name="s" value="$s" />
|
||||||
|
<input type="hidden" name="page" value="$page" />
|
||||||
|
|
||||||
|
<div class="overviewsearch">
|
||||||
|
{$searchcode}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<if $userinfo['customers_used'] < $userinfo['customers'] || $userinfo['customers'] == '-1'>
|
||||||
|
<div class="overviewadd">
|
||||||
|
<img src="templates/{$theme}/assets/img/icons/add.png" alt="" />
|
||||||
|
<a href="{$linker->getLink(array('section' => 'customers', 'page' => $page, 'action' => 'add'))}">{$lng['admin']['customer_add']}</a>
|
||||||
|
</div>
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<table class="full hl">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
{$lng['customer']['name']},
|
||||||
|
{$lng['customer']['firstname']} {$arrowcode['c.name']}
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
{$lng['login']['username']} {$arrowcode['c.loginname']}
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
{$lng['admin']['admin']} {$arrowcode['a.loginname']}
|
||||||
|
</th>
|
||||||
|
<th>{$lng['admin']['lastlogin_succ']}</th>
|
||||||
|
<th></th>
|
||||||
|
<th>{$lng['panel']['options']}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<tbody>
|
||||||
|
$customers
|
||||||
|
</tbody>
|
||||||
|
|
||||||
|
<if $pagingcode != ''>
|
||||||
|
<tfoot>
|
||||||
|
<tr>
|
||||||
|
<td colspan="6">{$pagingcode}</td>
|
||||||
|
</tr>
|
||||||
|
</tfoot>
|
||||||
|
</if>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<if ($userinfo['customers_used'] < $userinfo['customers'] || $userinfo['customers'] == '-1') && 15 < $userinfo['customers_used'] >
|
||||||
|
<div class="overviewadd">
|
||||||
|
<img src="templates/{$theme}/assets/img/icons/add.png" alt="" />
|
||||||
|
<a href="{$linker->getLink(array('section' => 'customers', 'page' => $page, 'action' => 'add'))}">{$lng['admin']['customer_add']}</a>
|
||||||
|
</div>
|
||||||
|
</if>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
$footer
|
||||||
36
templates/Maketank/admin/customers/customers_add.tpl
Normal file
36
templates/Maketank/admin/customers/customers_add.tpl
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
$header
|
||||||
|
<article>
|
||||||
|
<header>
|
||||||
|
<h2>
|
||||||
|
<img src="templates/{$theme}/assets/img/icons/user_add_big.png" alt="{$title}" />
|
||||||
|
{$title}
|
||||||
|
</h2>
|
||||||
|
</header>
|
||||||
|
<script type="text/javascript" src="templates/{$theme}/assets/js/customers.js"></script>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
|
||||||
|
<form action="{$linker->getLink(array('section' => 'customers'))}" 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">
|
||||||
|
{$customer_add_form}
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
<br />
|
||||||
|
<article>
|
||||||
|
<section>
|
||||||
|
<p>
|
||||||
|
<span class="red">*</span>: {$lng['admin']['valuemandatory']}<br />
|
||||||
|
<span class="red">**</span>: {$lng['admin']['valuemandatorycompany']}
|
||||||
|
</p>
|
||||||
|
</section>
|
||||||
|
</article>
|
||||||
|
$footer
|
||||||
98
templates/Maketank/admin/customers/customers_customer.tpl
Normal file
98
templates/Maketank/admin/customers/customers_customer.tpl
Normal file
@@ -0,0 +1,98 @@
|
|||||||
|
<tr <if $row['deactivated'] == 1>class="disabled"</if>>
|
||||||
|
<td>
|
||||||
|
<if $row['company'] != '' && $row['name'] != ''>
|
||||||
|
{$row['company']}<br />
|
||||||
|
<small>{$row['name']}, {$row['firstname']}</small>
|
||||||
|
</if>
|
||||||
|
<if $row['company'] != '' && $row['name'] == ''>
|
||||||
|
{$row['company']}
|
||||||
|
</if>
|
||||||
|
<if $row['company'] == ''>
|
||||||
|
{$row['name']}, {$row['firstname']}
|
||||||
|
</if>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a href="{$linker->getLink(array('section' => 'customers', 'page' => $page, 'action' => 'su', 'sort' => $row['loginname'], 'id' => $row['customerid']))}" rel="external">{$row['loginname']}</a>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
{$row['adminname']}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
{$last_login}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div>
|
||||||
|
<span class="overviewcustomerextras">
|
||||||
|
<span>Webspace:</span>
|
||||||
|
<if $row['diskspace'] != 'UL'>
|
||||||
|
<if (($row['diskspace']/100)*(int)\Froxlor\Settings::Get('system.report_webmax')) < $row['diskspace_used']>
|
||||||
|
<div class="progress progress-danger tipper" title="{$lng['panel']['used']}:<br>web: {$row['webspace_used']} {$lng['customer']['mib']}<br>mail: {$row['mailspace_used']} {$lng['customer']['mib']}<br>mysql: {$row['dbspace_used']} MiB<br><br>{$lng['panel']['assigned']}:<br>{$row['diskspace']} {$lng['customer']['mib']}">
|
||||||
|
<div class="bar" aria-valuenow="{$disk_percent}" aria-valuemin="0" aria-valuemax="100"></div>
|
||||||
|
</div>
|
||||||
|
<else>
|
||||||
|
<if (($row['diskspace']/100)*((int)\Froxlor\Settings::Get('system.report_webmax') - 15)) < $row['diskspace_used']>
|
||||||
|
<div class="progress progress-warn tipper" title="{$lng['panel']['used']}:<br>web: {$row['webspace_used']} {$lng['customer']['mib']}<br>mail: {$row['mailspace_used']} {$lng['customer']['mib']}<br>mysql: {$row['dbspace_used']} MiB<br><br>{$lng['panel']['assigned']}:<br>{$row['diskspace']} {$lng['customer']['mib']}">
|
||||||
|
<div class="bar" aria-valuenow="{$disk_percent}" aria-valuemin="0" aria-valuemax="100"></div>
|
||||||
|
</div>
|
||||||
|
<else>
|
||||||
|
<div class="progress tipper" title="{$lng['panel']['used']}:<br>web: {$row['webspace_used']} {$lng['customer']['mib']}<br>mail: {$row['mailspace_used']} {$lng['customer']['mib']}<br>mysql: {$row['dbspace_used']} MiB<br><br>{$lng['panel']['assigned']}:<br>{$row['diskspace']} {$lng['customer']['mib']}">
|
||||||
|
<div class="bar" aria-valuenow="{$disk_percent}" aria-valuemin="0" aria-valuemax="100"></div>
|
||||||
|
</div>
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
|
<else>
|
||||||
|
<div class="progress">∞
|
||||||
|
<div class="bar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div>
|
||||||
|
</div>
|
||||||
|
</if>
|
||||||
|
</span>
|
||||||
|
<span class="overviewcustomerextras">
|
||||||
|
<span>Traffic:</span>
|
||||||
|
<if $row['traffic'] != 'UL'>
|
||||||
|
<if (($row['traffic']/100)*(int)\Froxlor\Settings::Get('system.report_trafficmax')) < $row['traffic_used']>
|
||||||
|
<div class="progress progress-danger tipper" title="{$row['traffic_used']} GiB {$lng['panel']['used']}, {$row['traffic']} GiB {$lng['panel']['assigned']}">
|
||||||
|
<div class="bar" aria-valuenow="{$traffic_percent}" aria-valuemin="0" aria-valuemax="100"></div>
|
||||||
|
</div>
|
||||||
|
<else>
|
||||||
|
<if (($row['traffic']/100)*((int)\Froxlor\Settings::Get('system.report_trafficmax') - 15)) < $row['traffic_used']>
|
||||||
|
<div class="progress progress-warn tipper" title="{$row['traffic_used']} GiB {$lng['panel']['used']}, {$row['traffic']} GiB {$lng['panel']['assigned']}">
|
||||||
|
<div class="bar" aria-valuenow="{$traffic_percent}" aria-valuemin="0" aria-valuemax="100"></div>
|
||||||
|
</div>
|
||||||
|
<else>
|
||||||
|
<div class="progress tipper" title="{$row['traffic_used']} GiB {$lng['panel']['used']}, {$row['traffic']} GiB {$lng['panel']['assigned']}">
|
||||||
|
<div class="bar" aria-valuenow="{$traffic_percent}" aria-valuemin="0" aria-valuemax="100"></div>
|
||||||
|
</div>
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
|
<else>
|
||||||
|
<div class="progress">∞
|
||||||
|
<div class="bar" aria-valuenow="{$traffic_percent}" aria-valuemin="0" aria-valuemax="100"></div>
|
||||||
|
</div>
|
||||||
|
</if>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a href="{$linker->getLink(array('section' => 'customers', 'page' => $page, 'action' => 'edit', 'id' => $row['customerid']))}">
|
||||||
|
<img src="templates/{$theme}/assets/img/icons/edit.png" alt="{$lng['panel']['edit']}" title="{$lng['panel']['edit']}" />
|
||||||
|
</a>
|
||||||
|
<a href="{$linker->getLink(array('section' => 'customers', 'page' => $page, 'action' => 'delete', 'id' => $row['customerid']))}">
|
||||||
|
<img src="templates/{$theme}/assets/img/icons/delete.png" alt="{$lng['panel']['delete']}" title="{$lng['panel']['delete']}" />
|
||||||
|
</a>
|
||||||
|
<if $islocked == 1>
|
||||||
|
<a href="{$linker->getLink(array('section' => 'customers', 'page' => $page, 'action' => 'unlock', 'id' => $row['customerid']))}">
|
||||||
|
<img src="templates/{$theme}/assets/img/icons/unlock.png" alt="{$lng['panel']['unlock']}" title="{$lng['panel']['unlock']}" />
|
||||||
|
</a>
|
||||||
|
</if>
|
||||||
|
<if $row['custom_notes'] != ''>
|
||||||
|
<img src="templates/{$theme}/assets/img/icons/info.png" class="notes" data-id="{$row['loginname']}" alt="{$lng['usersettings']['custom_notes']['title']}" title="{$lng['usersettings']['custom_notes']['title']}" />
|
||||||
|
</if>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<if $row['custom_notes'] != ''>
|
||||||
|
<tr class="notes_block" id="notes_{$row['loginname']}">
|
||||||
|
<td colspan="6">
|
||||||
|
{$row['custom_notes']}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</if>
|
||||||
37
templates/Maketank/admin/customers/customers_edit.tpl
Normal file
37
templates/Maketank/admin/customers/customers_edit.tpl
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
$header
|
||||||
|
<article>
|
||||||
|
<header>
|
||||||
|
<h2>
|
||||||
|
<img src="templates/{$theme}/assets/img/icons/user_edit_big.png" alt="{$title}" />
|
||||||
|
{$title}
|
||||||
|
</h2>
|
||||||
|
</header>
|
||||||
|
<script type="text/javascript" src="templates/{$theme}/assets/js/customers.js"></script>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
|
||||||
|
<form action="{$linker->getLink(array('section' => 'customers'))}" 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="id" value="$id" />
|
||||||
|
<input type="hidden" name="send" value="send" />
|
||||||
|
|
||||||
|
<table class="full">
|
||||||
|
{$customer_edit_form}
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
<br />
|
||||||
|
<article>
|
||||||
|
<section>
|
||||||
|
<p>
|
||||||
|
<span class="red">*</span>: {$lng['admin']['valuemandatory']}<br />
|
||||||
|
<span class="red">**</span>: {$lng['admin']['valuemandatorycompany']}
|
||||||
|
</p>
|
||||||
|
</section>
|
||||||
|
</article>
|
||||||
|
$footer
|
||||||
73
templates/Maketank/admin/domains/domains.tpl
Normal file
73
templates/Maketank/admin/domains/domains.tpl
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
$header
|
||||||
|
<article>
|
||||||
|
<header>
|
||||||
|
<h2>
|
||||||
|
<img src="templates/{$theme}/assets/img/icons/domains_big.png" alt="" />
|
||||||
|
{$lng['admin']['domains']} ({$domainscount})
|
||||||
|
</h2>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
|
||||||
|
<form action="{$linker->getLink(array('section' => 'domains'))}" method="post" enctype="application/x-www-form-urlencoded">
|
||||||
|
<input type="hidden" name="s" value="$s" />
|
||||||
|
<input type="hidden" name="page" value="$page" />
|
||||||
|
|
||||||
|
<div class="overviewsearch">
|
||||||
|
{$searchcode}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<if ($userinfo['domains_used'] < $userinfo['domains'] || $userinfo['domains'] == '-1') && $countcustomers !=0 >
|
||||||
|
<div class="overviewadd">
|
||||||
|
<img src="templates/{$theme}/assets/img/icons/add.png" alt="" />
|
||||||
|
<a href="{$linker->getLink(array('section' => 'domains', 'page' => $page, 'action' => 'add'))}">{$lng['admin']['domain_add']}</a>
|
||||||
|
|
||||||
|
<img src="templates/{$theme}/assets/img/icons/archive.png" alt="" />
|
||||||
|
<a href="{$linker->getLink(array('section' => 'domains', 'page' => $page, 'action' => 'import'))}">{$lng['domains']['domain_import']}</a>
|
||||||
|
</div>
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<table class="full hl">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>{$lng['domains']['domainname']} {$arrowcode['d.domain_ace']}</th>
|
||||||
|
<th>{$lng['admin']['ipsandports']['ip']}</th>
|
||||||
|
<th>{$lng['admin']['customer']} {$arrowcode['c.loginname']}</th>
|
||||||
|
<th>{$lng['panel']['options']}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<tbody>
|
||||||
|
{$domains}
|
||||||
|
</tbody>
|
||||||
|
|
||||||
|
<if $pagingcode != ''>
|
||||||
|
<tfoot>
|
||||||
|
<tr>
|
||||||
|
<td colspan="4">{$pagingcode}</td>
|
||||||
|
</tr>
|
||||||
|
</tfoot>
|
||||||
|
</if>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<if $countcustomers == 0 >
|
||||||
|
<div class="warningcontainer bradius">
|
||||||
|
<div class="warningtitle">{$lng['admin']['warning']}</div>
|
||||||
|
<div class="warning">
|
||||||
|
<a href="{$linker->getLink(array('section' => 'customers', 'page' => 'customers', 'action' => 'add'))}">{$lng['admin']['domain_nocustomeraddingavailable']}</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<if ($userinfo['domains_used'] < $userinfo['domains'] || $userinfo['domains'] == '-1') && 15 < $count && 0 < $countcustomers >
|
||||||
|
<div class="overviewadd">
|
||||||
|
<img src="templates/{$theme}/assets/img/icons/add.png" alt="" />
|
||||||
|
<a href="{$linker->getLink(array('section' => 'domains', 'page' => $page, 'action' => 'add'))}">{$lng['admin']['domain_add']}</a>
|
||||||
|
</div>
|
||||||
|
</if>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
</article>
|
||||||
|
$footer
|
||||||
32
templates/Maketank/admin/domains/domains_add.tpl
Normal file
32
templates/Maketank/admin/domains/domains_add.tpl
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
$header
|
||||||
|
<article>
|
||||||
|
<header>
|
||||||
|
<h2>
|
||||||
|
<img src="templates/{$theme}/assets/img/icons/domain_add_big.png" alt="{$title}" />
|
||||||
|
{$title}
|
||||||
|
</h2>
|
||||||
|
</header>
|
||||||
|
<script type="text/javascript" src="templates/{$theme}/assets/js/domains.js"></script>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
|
||||||
|
<form action="{$linker->getLink(array('section' => 'domains'))}" 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">
|
||||||
|
{$domain_add_form}
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
<br />
|
||||||
|
<section>
|
||||||
|
<p>
|
||||||
|
<span class="red">*</span>: {$lng['admin']['valuemandatory']}
|
||||||
|
</p>
|
||||||
|
</section>
|
||||||
|
</article>
|
||||||
|
$footer
|
||||||
45
templates/Maketank/admin/domains/domains_domain.tpl
Normal file
45
templates/Maketank/admin/domains/domains_domain.tpl
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
<if $row['termination_css'] != ''>
|
||||||
|
<tr class="{$row['termination_css']}<if $row['deactivated'] == 1> disabled</if>">
|
||||||
|
</if>
|
||||||
|
<if $row['termination_css'] == ''>
|
||||||
|
<tr <if $row['deactivated'] == 1>class="disabled"</if>>
|
||||||
|
</if>
|
||||||
|
<td><b>{$row['domain']}</b>
|
||||||
|
<if (isset($row['standardsubdomain']) && $row['standardsubdomain'] == $row['id'])>
|
||||||
|
({$lng['admin']['stdsubdomain']})
|
||||||
|
</if>
|
||||||
|
<if $row['registration_date'] != ''>
|
||||||
|
<br><small>{$lng['domains']['registration_date']}: {$row['registration_date']}</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']}
|
||||||
|
<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>
|
||||||
|
<a href="{$linker->getLink(array('section' => 'domains', 'page' => 'logfiles', 'domain_id' => $row['id']))}">
|
||||||
|
<img src="templates/{$theme}/assets/img/icons/view.png" alt="{$lng['panel']['viewlogs']}" title="{$lng['panel']['viewlogs']}" />
|
||||||
|
</a>
|
||||||
|
<if $row['isbinddomain'] == '1' && \Froxlor\Settings::Get('system.bind_enable') == '1' && \Froxlor\Settings::Get('system.dnsenabled') == '1'>
|
||||||
|
<a href="{$linker->getLink(array('section' => 'domains', 'page' => 'domaindnseditor', 'domain_id' => $row['id']))}">
|
||||||
|
<img src="templates/{$theme}/assets/img/icons/dns_edit.png" alt="{$lng['dnseditor']['edit']}" title="{$lng['dnseditor']['edit']}" />
|
||||||
|
</a>
|
||||||
|
</if>
|
||||||
|
<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'] != \Froxlor\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']}" />
|
||||||
|
</a>
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
46
templates/Maketank/admin/domains/domains_edit.tpl
Normal file
46
templates/Maketank/admin/domains/domains_edit.tpl
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
$header
|
||||||
|
<article>
|
||||||
|
<header>
|
||||||
|
<h2>
|
||||||
|
<img src="templates/{$theme}/assets/img/icons/domain_edit_big.png" alt="{$title}" />
|
||||||
|
{$title}
|
||||||
|
<if $result['isbinddomain'] == '1' && \Froxlor\Settings::Get('system.bind_enable') == '1' && \Froxlor\Settings::Get('system.dnsenabled') == '1'>
|
||||||
|
(<small><a href="{$linker->getLink(array('section' => 'domains', 'page' => 'domaindnseditor', 'domain_id' => $id))}">{$lng['dnseditor']['edit']}</a></small>)
|
||||||
|
</if>
|
||||||
|
</h2>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
|
||||||
|
<form action="{$linker->getLink(array('section' => 'domains'))}" method="post" enctype="application/x-www-form-urlencoded">
|
||||||
|
<input type="hidden" name="delete_statistics_str" id="delete_statistics_str" value="{$lng['admin']['delete_statistics']}">
|
||||||
|
<input type="hidden" name="speciallogverified" id="speciallogverified" value="0" />
|
||||||
|
<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="id" value="$id" />
|
||||||
|
<input type="hidden" name="send" value="send" />
|
||||||
|
|
||||||
|
<div id="speciallogwarningpopup" name="speciallogwarningpopup" align="center">
|
||||||
|
<div class="warningtitle">{$lng['admin']['delete_statistics']}</div>
|
||||||
|
</p>{$speciallogwarning}</p>
|
||||||
|
<input type="text" name="delete_stats" id="delete_stats"></p>
|
||||||
|
<div>
|
||||||
|
<input type="button" class="yesbutton" name="verifybutton" value="{$lng['panel']['delete']}" id="speciallogyesbutton" />
|
||||||
|
<input type="button" class="nobutton" value="{$lng['panel']['cancel']}" id="speciallognobutton" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<table class="full">
|
||||||
|
{$domain_edit_form}
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
</section>
|
||||||
|
<br />
|
||||||
|
<section>
|
||||||
|
<p>
|
||||||
|
<span class="red">*</span>: {$lng['admin']['valuemandatory']}
|
||||||
|
</p>
|
||||||
|
</section>
|
||||||
|
</article>
|
||||||
|
$footer
|
||||||
38
templates/Maketank/admin/domains/domains_import.tpl
Normal file
38
templates/Maketank/admin/domains/domains_import.tpl
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
$header
|
||||||
|
<article>
|
||||||
|
<header>
|
||||||
|
<h2>
|
||||||
|
<img src="templates/{$theme}/assets/img/icons/domain_add_big.png" alt="{$title}" />
|
||||||
|
{$title}
|
||||||
|
</h2>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<div class="messagewrapperfull">
|
||||||
|
<div class="warningcontainer bradius">
|
||||||
|
<div class="warningtitle">{$lng['admin']['note']}</div>
|
||||||
|
<div class="warning">{$lng['domains']['import_description']}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
|
||||||
|
<form action="{$linker->getLink(array('section' => 'domains'))}" method="post" enctype="multipart/form-data">
|
||||||
|
<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">
|
||||||
|
{$domain_import_form}
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
<br />
|
||||||
|
<section>
|
||||||
|
<p>
|
||||||
|
<span class="red">*</span>: {$lng['admin']['valuemandatory']}
|
||||||
|
</p>
|
||||||
|
</section>
|
||||||
|
</article>
|
||||||
|
$footer
|
||||||
33
templates/Maketank/admin/index/change_language.tpl
Normal file
33
templates/Maketank/admin/index/change_language.tpl
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
$header
|
||||||
|
<article>
|
||||||
|
<header>
|
||||||
|
<h2>
|
||||||
|
<img src="templates/{$theme}/assets/img/icons/flag.png" alt="" />
|
||||||
|
{$lng['menue']['main']['changelanguage']}
|
||||||
|
</h2>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<form method="post" action="{$linker->getLink(array('section' => 'index'))}" enctype="application/x-www-form-urlencoded">
|
||||||
|
<fieldset>
|
||||||
|
<input type="hidden" name="s" value="$s" />
|
||||||
|
<input type="hidden" name="page" value="$page" />
|
||||||
|
<input type="hidden" name="send" value="send" />
|
||||||
|
<table class="tiny center">
|
||||||
|
<tr>
|
||||||
|
<td><label for="def_language">{$lng['login']['language']}:</label></td>
|
||||||
|
<td><select id="def_language" name="def_language">$language_options</select></td>
|
||||||
|
</tr>
|
||||||
|
<tfoot>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" align="center">
|
||||||
|
<input type="submit" value="{$lng['menue']['main']['changelanguage']}" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tfoot>
|
||||||
|
</table>
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
</section>
|
||||||
|
</article>
|
||||||
|
$footer
|
||||||
41
templates/Maketank/admin/index/change_password.tpl
Normal file
41
templates/Maketank/admin/index/change_password.tpl
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
$header
|
||||||
|
<article>
|
||||||
|
<header>
|
||||||
|
<h2>
|
||||||
|
<img src="templates/{$theme}/assets/img/icons/lock_big.png" alt="" />
|
||||||
|
{$lng['menue']['main']['changepassword']}
|
||||||
|
</h2>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<form method="post" action="{$linker->getLink(array('section' => 'index'))}" enctype="application/x-www-form-urlencoded">
|
||||||
|
<fieldset>
|
||||||
|
<input type="hidden" name="s" value="$s" />
|
||||||
|
<input type="hidden" name="page" value="$page" />
|
||||||
|
<input type="hidden" name="send" value="send" />
|
||||||
|
<table class="middle center">
|
||||||
|
<tr>
|
||||||
|
<td><label for="old_password">{$lng['changepassword']['old_password']}:</label></td>
|
||||||
|
<td><input type="password" id="old_password" name="old_password" /></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><label for="new_password">{$lng['changepassword']['new_password']}:</label></td>
|
||||||
|
<td><input type="password" id="new_password" name="new_password" /></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><label for="new_password_confirm">{$lng['changepassword']['new_password_confirm']}:</label></td>
|
||||||
|
<td><input type="password" id="new_password_confirm" name="new_password_confirm" /></td>
|
||||||
|
</tr>
|
||||||
|
<tfoot>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" align="center">
|
||||||
|
<input type="submit" value="{$lng['menue']['main']['changepassword']}" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tfoot>
|
||||||
|
</table>
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
</section>
|
||||||
|
</article>
|
||||||
|
$footer
|
||||||
33
templates/Maketank/admin/index/change_theme.tpl
Normal file
33
templates/Maketank/admin/index/change_theme.tpl
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
$header
|
||||||
|
<article>
|
||||||
|
<header>
|
||||||
|
<h2>
|
||||||
|
<img src="templates/{$theme}/assets/img/icons/display_big.png" alt="" />
|
||||||
|
{$lng['menue']['main']['changetheme']}
|
||||||
|
</h2>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<form method="post" action="{$linker->getLink(array('section' => 'index'))}" enctype="application/x-www-form-urlencoded">
|
||||||
|
<fieldset>
|
||||||
|
<input type="hidden" name="s" value="$s" />
|
||||||
|
<input type="hidden" name="page" value="$page" />
|
||||||
|
<input type="hidden" name="send" value="send" />
|
||||||
|
<table class="tiny center">
|
||||||
|
<tr>
|
||||||
|
<td><label for="theme">{$lng['panel']['theme']}:</label></td>
|
||||||
|
<td><select id="theme" name="theme">$theme_options</select></td>
|
||||||
|
</tr>
|
||||||
|
<tfoot>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" align="center">
|
||||||
|
<input class="bottom" type="submit" value="{$lng['menue']['main']['changetheme']}" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tfoot>
|
||||||
|
</table>
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
</section>
|
||||||
|
</article>
|
||||||
|
$footer
|
||||||
279
templates/Maketank/admin/index/index.tpl
Normal file
279
templates/Maketank/admin/index/index.tpl
Normal file
@@ -0,0 +1,279 @@
|
|||||||
|
$header
|
||||||
|
<article>
|
||||||
|
<h2>
|
||||||
|
<img src="templates/{$theme}/assets/img/icons/domains_big.png" alt="" />
|
||||||
|
{$lng['panel']['dashboard']}
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<div class="grid-g">
|
||||||
|
<div class="grid-u-1-2" id="statsbox">
|
||||||
|
<div class="canvasbox">
|
||||||
|
<input type="hidden" id="customers" class="circular" data-used="{$overview['number_customers']}" data-available="{$userinfo['customers']}">
|
||||||
|
<canvas id="customers-canvas" width="120" height="76"></canvas><br/>
|
||||||
|
{$lng['admin']['customers']}<br />
|
||||||
|
<small>
|
||||||
|
{$overview['number_customers']} {$lng['panel']['used']}<br />
|
||||||
|
<if $userinfo['customers'] != '∞'>
|
||||||
|
{$userinfo['customers']} {$lng['panel']['available']}
|
||||||
|
</if>
|
||||||
|
</small>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="canvasbox">
|
||||||
|
<input type="hidden" id="domains" class="circular" data-used="{$overview['number_domains']}" data-available="{$userinfo['domains']}">
|
||||||
|
<canvas id="domains-canvas" width="120" height="76"></canvas><br/>
|
||||||
|
{$lng['customer']['domains']}<br />
|
||||||
|
<small>
|
||||||
|
{$overview['number_domains']} {$lng['panel']['used']}<br />
|
||||||
|
<if $userinfo['domains'] != '∞'>
|
||||||
|
{$userinfo['domains']} {$lng['panel']['available']}
|
||||||
|
</if>
|
||||||
|
</small>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="canvasbox">
|
||||||
|
<input type="hidden" id="subdomains" class="circular" data-used="{$overview['subdomains_used']}" data-available="{$userinfo['subdomains']}" data-assigned="{$userinfo['subdomains_used']}">
|
||||||
|
<canvas id="subdomains-canvas" width="120" height="76"></canvas><br/>
|
||||||
|
{$lng['customer']['subdomains']}<br />
|
||||||
|
<small>
|
||||||
|
{$overview['subdomains_used']} {$lng['panel']['used']}<br />
|
||||||
|
{$userinfo['subdomains_used']} {$lng['panel']['assigned']}<br />
|
||||||
|
<if $userinfo['subdomains'] != '∞'>
|
||||||
|
{$userinfo['subdomains']} {$lng['panel']['available']}
|
||||||
|
</if>
|
||||||
|
</small>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="canvasbox">
|
||||||
|
<input type="hidden" id="diskspace" class="circular" data-used="{$overview['diskspace_used']}" data-available="{$userinfo['diskspace']}" data-assigned="{$userinfo['diskspace_used']}">
|
||||||
|
<canvas id="diskspace-canvas" width="120" height="76"></canvas><br/>
|
||||||
|
{$lng['customer']['diskspace']}<br />
|
||||||
|
<small>
|
||||||
|
{$overview['diskspace_used']} {$lng['panel']['used']}<br />
|
||||||
|
{$userinfo['diskspace_used']} {$lng['panel']['assigned']}<br />
|
||||||
|
<if $userinfo['diskspace'] != '∞'>
|
||||||
|
{$userinfo['diskspace']} {$lng['panel']['available']}
|
||||||
|
</if>
|
||||||
|
</small>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="canvasbox">
|
||||||
|
<input type="hidden" id="traffic" class="circular" data-used="{$overview['traffic_used']}" data-available="{$userinfo['traffic']}" data-assigned="{$userinfo['traffic_used']}">
|
||||||
|
<canvas id="traffic-canvas" width="120" height="76"></canvas><br/>
|
||||||
|
{$lng['customer']['traffic']}<br />
|
||||||
|
<small>
|
||||||
|
{$overview['traffic_used']} {$lng['panel']['used']}<br />
|
||||||
|
{$userinfo['traffic_used']} {$lng['panel']['assigned']}<br />
|
||||||
|
<if $userinfo['traffic'] != '∞'>
|
||||||
|
{$userinfo['traffic']} {$lng['panel']['available']}
|
||||||
|
</if>
|
||||||
|
</small>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="canvasbox">
|
||||||
|
<input type="hidden" id="mysqls" class="circular" data-used="{$overview['mysqls_used']}" data-available="{$userinfo['mysqls']}" data-assigned="{$userinfo['mysqls_used']}">
|
||||||
|
<canvas id="mysqls-canvas" width="120" height="76"></canvas><br/>
|
||||||
|
{$lng['customer']['mysqls']}<br />
|
||||||
|
<small>
|
||||||
|
{$overview['mysqls_used']} {$lng['panel']['used']}<br />
|
||||||
|
{$userinfo['mysqls_used']} {$lng['panel']['assigned']}<br />
|
||||||
|
<if $userinfo['mysqls'] != '∞'>
|
||||||
|
{$userinfo['mysqls']} {$lng['panel']['available']}
|
||||||
|
</if>
|
||||||
|
</small>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="canvasbox">
|
||||||
|
<input type="hidden" id="emails" class="circular" data-used="{$overview['emails_used']}" data-available="{$userinfo['emails']}" data-assigned="{$userinfo['emails_used']}">
|
||||||
|
<canvas id="emails-canvas" width="120" height="76"></canvas><br/>
|
||||||
|
{$lng['customer']['emails']}<br />
|
||||||
|
<small>
|
||||||
|
{$overview['emails_used']} {$lng['panel']['used']}<br />
|
||||||
|
{$userinfo['emails_used']} {$lng['panel']['assigned']}<br />
|
||||||
|
<if $userinfo['emails'] != '∞'>
|
||||||
|
{$userinfo['emails']} {$lng['panel']['available']}
|
||||||
|
</if>
|
||||||
|
</small>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="canvasbox">
|
||||||
|
<input type="hidden" id="email_accounts" class="circular" data-used="{$overview['email_accounts_used']}" data-available="{$userinfo['email_accounts']}" data-assigned="{$userinfo['email_accounts_used']}">
|
||||||
|
<canvas id="email_accounts-canvas" width="120" height="76"></canvas><br/>
|
||||||
|
{$lng['customer']['accounts']}<br />
|
||||||
|
<small>
|
||||||
|
{$overview['email_accounts_used']} {$lng['panel']['used']}<br />
|
||||||
|
{$userinfo['email_accounts_used']} {$lng['panel']['assigned']}<br />
|
||||||
|
<if $userinfo['email_accounts'] != '∞'>
|
||||||
|
{$userinfo['email_accounts']} {$lng['panel']['available']}
|
||||||
|
</if>
|
||||||
|
</small>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="canvasbox">
|
||||||
|
<input type="hidden" id="email_forwarders" class="circular" data-used="{$overview['email_forwarders_used']}" data-available="{$userinfo['email_forwarders']}" data-assigned="{$userinfo['email_forwarders_used']}">
|
||||||
|
<canvas id="email_forwarders-canvas" width="120" height="76"></canvas><br/>
|
||||||
|
{$lng['customer']['forwarders']}<br />
|
||||||
|
<small>
|
||||||
|
{$overview['email_forwarders_used']} {$lng['panel']['used']}<br />
|
||||||
|
{$userinfo['email_forwarders_used']} {$lng['panel']['assigned']}<br />
|
||||||
|
<if $userinfo['email_forwarders'] != '∞'>
|
||||||
|
{$userinfo['email_forwarders']} {$lng['panel']['available']}
|
||||||
|
</if>
|
||||||
|
</small>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<if \Froxlor\Settings::Get('system.mail_quota_enabled') == 1>
|
||||||
|
<div class="canvasbox">
|
||||||
|
<input type="hidden" id="email_quota" class="circular" data-used="{$overview['email_quota_used']}" data-available="{$userinfo['email_quota']}" data-assigned="{$userinfo['email_quota_used']}">
|
||||||
|
<canvas id="email_quota-canvas" width="120" height="76"></canvas><br/>
|
||||||
|
{$lng['customer']['email_quota']}<br />
|
||||||
|
<small>
|
||||||
|
{$overview['email_quota_used']} {$lng['panel']['used']}<br />
|
||||||
|
{$userinfo['email_quota_used']} {$lng['panel']['assigned']}<br />
|
||||||
|
<if $userinfo['email_quota'] != '∞'>
|
||||||
|
{$userinfo['email_quota']} {$lng['panel']['available']}
|
||||||
|
</if>
|
||||||
|
</small>
|
||||||
|
</div>
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<div class="canvasbox">
|
||||||
|
<input type="hidden" id="ftps" class="circular" data-used="{$overview['ftps_used']}" data-available="{$userinfo['ftps']}" data-assigned="{$userinfo['ftps_used']}">
|
||||||
|
<canvas id="ftps-canvas" width="120" height="76"></canvas><br/>
|
||||||
|
{$lng['customer']['ftps']}<br />
|
||||||
|
<small>
|
||||||
|
{$overview['ftps_used']} {$lng['panel']['used']}<br />
|
||||||
|
{$userinfo['ftps_used']} {$lng['panel']['assigned']}<br />
|
||||||
|
<if $userinfo['ftps'] != '∞'>
|
||||||
|
{$userinfo['ftps']} {$lng['panel']['available']}
|
||||||
|
</if>
|
||||||
|
</small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="grid-u-1-2">
|
||||||
|
<if \Froxlor\Settings::Get('admin.show_news_feed') == '1'>
|
||||||
|
<table class="dboarditem full" id="newsfeed">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>News</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<ul class="newsfeed" id="newsfeeditems"></ul>
|
||||||
|
</td>
|
||||||
|
</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'>
|
||||||
|
<table class="dboarditem full">
|
||||||
|
<tbody>
|
||||||
|
<tr><td>{$userinfo['custom_notes']}</td></tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<table class="dboarditem">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th colspan="2">{$lng['admin']['systemdetails']}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>{$lng['admin']['hostname']}:</td>
|
||||||
|
<td>{$system_hostname}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{$lng['admin']['serversoftware']}:</td>
|
||||||
|
<td>{$_SERVER['SERVER_SOFTWARE']}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{$lng['admin']['phpversion']}:</td>
|
||||||
|
<td><a href="{$linker->getLink(array('section' => 'settings', 'page' => 'phpinfo'))}">$phpversion</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="nowrap">{$lng['admin']['mysqlserverversion']}:</td>
|
||||||
|
<td>$mysqlserverversion</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{$lng['admin']['webserverinterface']}:</td>
|
||||||
|
<td>$webserverinterface</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{$lng['admin']['memory']}:</td>
|
||||||
|
<td><pre>$memory</pre></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{$lng['admin']['sysload']}:</td>
|
||||||
|
<td>$load</td>
|
||||||
|
</tr>
|
||||||
|
<if $showkernel == 1>
|
||||||
|
<tr>
|
||||||
|
<td>Kernel:</td>
|
||||||
|
<td>$kernel</td>
|
||||||
|
</tr>
|
||||||
|
</if>
|
||||||
|
<if $uptime != ''>
|
||||||
|
<tr>
|
||||||
|
<td>Uptime:</td>
|
||||||
|
<td>$uptime</td>
|
||||||
|
</tr>
|
||||||
|
</if>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<table class="dboarditem">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th colspan="2">{$lng['admin']['froxlordetails']}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{$outstanding_tasks}
|
||||||
|
{$cron_last_runs}
|
||||||
|
<tr>
|
||||||
|
<td>{$lng['admin']['installedversion']}:</td>
|
||||||
|
<td>{$version}{$branding} (DB: {$dbversion})</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{$lng['admin']['latestversion']}:</td>
|
||||||
|
<if $isnewerversion != 0 >
|
||||||
|
<td><a href="$lookfornewversion_link"><strong>$lookfornewversion_lable</strong></a></td>
|
||||||
|
<else>
|
||||||
|
<td><a href="$lookfornewversion_link">$lookfornewversion_lable</a></td>
|
||||||
|
</if>
|
||||||
|
</tr>
|
||||||
|
<if $lookfornewversion_message != ''>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2"><strong>$lookfornewversion_message</strong></td>
|
||||||
|
</tr>
|
||||||
|
</if>
|
||||||
|
<if $lookfornewversion_addinfo != ''>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">$lookfornewversion_addinfo</td>
|
||||||
|
</tr>
|
||||||
|
</if>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
$footer
|
||||||
4
templates/Maketank/admin/index/overview_item.tpl
Normal file
4
templates/Maketank/admin/index/overview_item.tpl
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<tr>
|
||||||
|
<td>{$text}:</td>
|
||||||
|
<td>{$value}</td>
|
||||||
|
</tr>
|
||||||
43
templates/Maketank/admin/index/send_error_report.tpl
Normal file
43
templates/Maketank/admin/index/send_error_report.tpl
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
$header
|
||||||
|
<article>
|
||||||
|
<header>
|
||||||
|
<h2>
|
||||||
|
<img src="templates/{$theme}/assets/img/icons/error_report_big.png" alt="" />
|
||||||
|
{$lng['error']['send_report_title']}
|
||||||
|
</h2>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<form method="post" action="{$linker->getLink(array('section' => 'index', 'errorid' => $errid))}" enctype="application/x-www-form-urlencoded">
|
||||||
|
<fieldset>
|
||||||
|
<input type="hidden" name="s" value="$s" />
|
||||||
|
<input type="hidden" name="page" value="$page" />
|
||||||
|
<input type="hidden" name="send" value="send" />
|
||||||
|
<table class="full">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
<p>{$lng['error']['send_report_desc']}</p>
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<code>{$mail_html}</code>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
<tfoot>
|
||||||
|
<tr>
|
||||||
|
<td align="center">
|
||||||
|
<input class="bottom" type="submit" value="{$lng['error']['send_report']}" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tfoot>
|
||||||
|
</table>
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
</section>
|
||||||
|
</article>
|
||||||
|
$footer
|
||||||
63
templates/Maketank/admin/ipsandports/ipsandports.tpl
Normal file
63
templates/Maketank/admin/ipsandports/ipsandports.tpl
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
$header
|
||||||
|
<article>
|
||||||
|
<header>
|
||||||
|
<h2>
|
||||||
|
<img src="templates/{$theme}/assets/img/icons/ipsports_big.png" alt="" />
|
||||||
|
{$lng['admin']['ipsandports']['ipsandports']}
|
||||||
|
</h2>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
|
||||||
|
<form action="{$linker->getLink(array('section' => 'ipsandports'))}" method="post" enctype="application/x-www-form-urlencoded">
|
||||||
|
<input type="hidden" name="s" value="$s"/>
|
||||||
|
<input type="hidden" name="page" value="$page"/>
|
||||||
|
<div class="overviewsearch">
|
||||||
|
{$searchcode}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="overviewadd">
|
||||||
|
<img src="templates/{$theme}/assets/img/icons/add.png" alt="" />
|
||||||
|
<a href="{$linker->getLink(array('section' => 'ipsandports', 'page' => $page, 'action' => 'add'))}">{$lng['admin']['ipsandports']['add']}</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<table class="full hl">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>{$lng['admin']['ipsandports']['ip']} {$arrowcode['ip']}</th>
|
||||||
|
<th>{$lng['admin']['ipsandports']['port']} {$arrowcode['port']}</th>
|
||||||
|
<if !$is_nginx><th>Listen</th></if>
|
||||||
|
<if $is_apache && !$is_apache24><th>NameVirtualHost</th></if>
|
||||||
|
<th>vHost-Container</th>
|
||||||
|
<th>Specialsettings</th>
|
||||||
|
<if $is_apache><th>ServerName</th></if>
|
||||||
|
<th>SSL</th>
|
||||||
|
<th>{$lng['panel']['options']}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<if $pagingcode != ''>
|
||||||
|
<tfoot>
|
||||||
|
<tr>
|
||||||
|
<td colspan="<if $is_apache>8<else>6</if>">{$pagingcode}</td>
|
||||||
|
</tr>
|
||||||
|
</tfoot>
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<tbody>
|
||||||
|
$ipsandports
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<if 15 < $count>
|
||||||
|
<div class="overviewadd">
|
||||||
|
<img src="templates/{$theme}/assets/img/icons/add.png" alt="" />
|
||||||
|
<a href="{$linker->getLink(array('section' => 'ipsandports', 'page' => $page, 'action' => 'add'))}">{$lng['admin']['ipsandports']['add']}</a>
|
||||||
|
</div>
|
||||||
|
</if>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
$footer
|
||||||
26
templates/Maketank/admin/ipsandports/ipsandports_add.tpl
Normal file
26
templates/Maketank/admin/ipsandports/ipsandports_add.tpl
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
$header
|
||||||
|
<article>
|
||||||
|
<header>
|
||||||
|
<h2>
|
||||||
|
<img src="templates/{$theme}/assets/img/icons/ipsports_add_big.png" alt="{$title}" />
|
||||||
|
{$title}
|
||||||
|
</h2>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
|
||||||
|
<form action="{$linker->getLink(array('section' => 'ipsandports'))}" 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">
|
||||||
|
{$ipsandports_add_form}
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
$footer
|
||||||
27
templates/Maketank/admin/ipsandports/ipsandports_edit.tpl
Normal file
27
templates/Maketank/admin/ipsandports/ipsandports_edit.tpl
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
$header
|
||||||
|
<article>
|
||||||
|
<header>
|
||||||
|
<h2>
|
||||||
|
<img src="templates/{$theme}/assets/img/icons/ipsports_edit_big.png" alt="{$title}" />
|
||||||
|
{$title}
|
||||||
|
</h2>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
|
||||||
|
<form action="{$linker->getLink(array('section' => 'ipsandports'))}" 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="id" value="$id" />
|
||||||
|
<input type="hidden" name="send" value="send" />
|
||||||
|
|
||||||
|
<table class="full">
|
||||||
|
{$ipsandports_edit_form}
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
$footer
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
<tr>
|
||||||
|
<td>{$row['ip']}</td>
|
||||||
|
<td>{$row['port']}</td>
|
||||||
|
<if !$is_nginx><td><if $row['listen_statement']=='1'>{$lng['panel']['yes']}<else>{$lng['panel']['no']}</if></td></if>
|
||||||
|
<if $is_apache && !$is_apache24><td><if $row['namevirtualhost_statement']=='1'>{$lng['panel']['yes']}<else>{$lng['panel']['no']}</if></td></if>
|
||||||
|
<td><if $row['vhostcontainer']=='1'>{$lng['panel']['yes']}<else>{$lng['panel']['no']}</if></td>
|
||||||
|
<td><if $row['specialsettings']!=''>{$lng['panel']['yes']}<else>{$lng['panel']['no']}</if></td>
|
||||||
|
<if $is_apache><td><if $row['vhostcontainer_servername_statement']=='1'>{$lng['panel']['yes']}<else>{$lng['panel']['no']}</if></td></if>
|
||||||
|
<td><if $row['ssl']=='1'>{$lng['panel']['yes']}<else>{$lng['panel']['no']}</if></td>
|
||||||
|
<td>
|
||||||
|
<a href="{$linker->getLink(array('section' => 'ipsandports', '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' => 'ipsandports', '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>
|
||||||
53
templates/Maketank/admin/logger/logger.tpl
Normal file
53
templates/Maketank/admin/logger/logger.tpl
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
$header
|
||||||
|
<article>
|
||||||
|
<header>
|
||||||
|
<h2>
|
||||||
|
<img src="templates/{$theme}/assets/img/icons/syslog_big.png" alt="" />
|
||||||
|
{$lng['menue']['logger']['logger']}
|
||||||
|
</h2>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
|
||||||
|
<form action="{$linker->getLink(array('section' => 'logger'))}" 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="send" value="send" />
|
||||||
|
|
||||||
|
<div class="overviewsearch">
|
||||||
|
{$searchcode}
|
||||||
|
</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>
|
||||||
|
|
||||||
|
<table class="full hl">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>{$lng['logger']['date']} {$arrowcode['date']}</th>
|
||||||
|
<th>{$lng['logger']['type']} {$arrowcode['type']}</th>
|
||||||
|
<th>{$lng['logger']['user']} {$arrowcode['user']}</th>
|
||||||
|
<th>{$lng['logger']['action']}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
$log
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<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>
|
||||||
|
</if>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
$footer
|
||||||
3
templates/Maketank/admin/logger/logger_action.tpl
Normal file
3
templates/Maketank/admin/logger/logger_action.tpl
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<tr>
|
||||||
|
<td colspan="4"><strong>{$row['action']}</strong></td>
|
||||||
|
</tr>
|
||||||
6
templates/Maketank/admin/logger/logger_log.tpl
Normal file
6
templates/Maketank/admin/logger/logger_log.tpl
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<tr>
|
||||||
|
<td>{$row['date']}</td>
|
||||||
|
<td>{$row['type']}</td>
|
||||||
|
<td>{$row['user']}</td>
|
||||||
|
<td>{$row['text']}</td>
|
||||||
|
</tr>
|
||||||
50
templates/Maketank/admin/message/message.tpl
Normal file
50
templates/Maketank/admin/message/message.tpl
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
$header
|
||||||
|
<article>
|
||||||
|
<header>
|
||||||
|
<h2>
|
||||||
|
<img src="templates/{$theme}/assets/img/icons/messages_big.png" alt="" />
|
||||||
|
{$lng['admin']['message']}
|
||||||
|
</h2>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<if 0 < $success >
|
||||||
|
<div class="successcontainer bradius">
|
||||||
|
<div class="successtitle">{$lng['success']['success']}</div>
|
||||||
|
<div class="success">{$successmessage}</div>
|
||||||
|
</div>
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<form action="$filename" 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">
|
||||||
|
<tr>
|
||||||
|
<td><b><label for="receipient">{$lng['admin']['receipient']}</label></b></td>
|
||||||
|
<td><select name="receipient" id="receipient">$receipients</select></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><b><label for="subject">{$lng['admin']['subject']}</label></b></td>
|
||||||
|
<td><input type="text" name="subject" id="subject" value="{$lng['admin']['nosubject']}"/></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><b><label for="message">{$lng['admin']['text']}</label></b></td>
|
||||||
|
<td><textarea rows="12" cols="80" name="message" id="message"></textarea></td>
|
||||||
|
</tr>
|
||||||
|
<tfoot>
|
||||||
|
<tr>
|
||||||
|
<td align="right" colspan="2">
|
||||||
|
<input type="submit" value="{$lng['panel']['send']}" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tfoot>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
$footer
|
||||||
98
templates/Maketank/admin/phpconfig/fpmconfig_add.tpl
Normal file
98
templates/Maketank/admin/phpconfig/fpmconfig_add.tpl
Normal file
@@ -0,0 +1,98 @@
|
|||||||
|
$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' => 'phpsettings'))}" 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">
|
||||||
|
{$fpmconfig_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>{PEAR_DIR}</em></td>
|
||||||
|
<td>{$lng['admin']['phpconfig']['pear_dir']}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><em>{OPEN_BASEDIR_C}</em></td>
|
||||||
|
<td>{$lng['admin']['phpconfig']['open_basedir_c']}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><em>{OPEN_BASEDIR}</em></td>
|
||||||
|
<td>{$lng['admin']['phpconfig']['open_basedir']}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><em>{OPEN_BASEDIR_GLOBAL}</em></td>
|
||||||
|
<td>{$lng['admin']['phpconfig']['open_basedir_global']}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><em>{TMP_DIR}</em></td>
|
||||||
|
<td>{$lng['admin']['phpconfig']['tmp_dir']}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><em>{CUSTOMER_EMAIL}</em></td>
|
||||||
|
<td>{$lng['admin']['phpconfig']['customer_email']}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><em>{ADMIN_EMAIL}</em></td>
|
||||||
|
<td>{$lng['admin']['phpconfig']['admin_email']}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><em>{DOMAIN}</em></td>
|
||||||
|
<td>{$lng['admin']['phpconfig']['domain']}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><em>{CUSTOMER}</em></td>
|
||||||
|
<td>{$lng['admin']['phpconfig']['customer']}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<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>
|
||||||
|
<tr>
|
||||||
|
<td><em>{CUSTOMER_HOMEDIR}</em></td>
|
||||||
|
<td>{$lng['admin']['phpconfig']['homedir']}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
|
||||||
|
$footer
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user