upgraded assets for webpanel, further enhancements and fixes regarding docker env
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
if (isset($_COOKIE['NAS_USER']) && isset($_COOKIE['NAS_SID'])) {
|
||||
if (isset($_COOKIE['NAS_USER']) && isset($_COOKIE['NAS_SID'])) {
|
||||
$context = stream_context_create(array('ssl'=>array(
|
||||
'verify_peer' => false,
|
||||
'verify_peer_name' => false
|
||||
@@ -18,6 +18,7 @@ if (isset($_COOKIE['NAS_USER']) && isset($_COOKIE['NAS_SID'])) {
|
||||
die('Not logged in!');
|
||||
}
|
||||
|
||||
|
||||
define('DOCROOT', '/home/httpd/cgi-bin/qpkg/RoonServer/');
|
||||
include(DOCROOT . "__include.php");
|
||||
include(DOCROOT . "__functions.php");
|
||||
@@ -25,12 +26,11 @@ include(DOCROOT . "__functions.php");
|
||||
$strVarAction = filter_var($_GET['a'], FILTER_SANITIZE_STRING);
|
||||
$strVarTree = filter_var($_GET['t'], FILTER_SANITIZE_STRING);
|
||||
$strModalContent = filter_var($_GET['c'], FILTER_SANITIZE_STRING);
|
||||
$strOptionsContent = filter_var($_GET['o'], FILTER_SANITIZE_STRING);
|
||||
|
||||
/*
|
||||
* funktion prüfen auf etc
|
||||
*/
|
||||
|
||||
|
||||
if ($strVarAction == 'test') {
|
||||
echo "hi!";
|
||||
}
|
||||
|
||||
if ($strVarAction == 'gettree') {
|
||||
$arr = getTreeAt(urlencode($strVarTree), $strSessionID);
|
||||
@@ -39,21 +39,6 @@ if ($strVarAction == 'gettree') {
|
||||
exit();
|
||||
}
|
||||
|
||||
if ($strVarAction == 'checkHelperScript') {
|
||||
$running = file_exists(APPINSTALLPATH . '/.helperscript.lock');
|
||||
header('Content-Type: application/json');
|
||||
if ($running) {
|
||||
echo json_encode(array(
|
||||
'success' => true
|
||||
));
|
||||
} else {
|
||||
echo json_encode(array(
|
||||
'success' => false
|
||||
));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
if ($strVarAction == 'dbPathIsSet') {
|
||||
$qpkg_conf = parse_ini_file('/etc/config/qpkg.conf', 1, INI_SCANNER_RAW);
|
||||
$roon_qpkg_conf = $qpkg_conf['RoonServer'];
|
||||
@@ -70,6 +55,22 @@ if ($strVarAction == 'dbPathIsSet') {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ($strVarAction == 'setOptions') {
|
||||
$features = explode(';', $strOptionsContent);
|
||||
shell_exec('setcfg RoonServer options "' . implode(' ', $features) . '" -f /etc/config/qpkg.conf');
|
||||
$qpkg_conf = parse_ini_file('/etc/config/qpkg.conf', 1, INI_SCANNER_RAW);
|
||||
$roon_qpkg_options = $qpkg_conf['RoonServer']['options'];
|
||||
header('Content-Type: application/json');
|
||||
//$obj = json_encode(array(
|
||||
// 'success' => true
|
||||
//));
|
||||
echo json_encode(array(
|
||||
'success' => true,
|
||||
'options' => implode(' ', $features)
|
||||
));
|
||||
return true;
|
||||
}
|
||||
|
||||
if ($strVarAction == 'updateformfield') {
|
||||
set_db_path(escapeshellarg('/share' . $strVarTree));
|
||||
flush();
|
||||
|
||||
Reference in New Issue
Block a user