Adds hosts config page

main
Yasen Pramatarov 2024-10-30 17:21:36 +02:00
parent 3c85c16480
commit b79a0ac4da
1 changed files with 18 additions and 8 deletions

View File

@ -110,6 +110,7 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
} else {
switch ($item) {
case 'platform':
if (isset($action) && $action === 'add') {
include '../app/templates/config-platform-add.php';
@ -125,18 +126,27 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
}
}
break;
case 'host':
$mode = $_REQUEST['mode'] ?? '';
$raw = ($mode === 'raw');
$platformInterfaceConfigjs = $configObject->getPlatformInterfaceConfigjs($platformDetails[0]['jitsi_url'], $raw);
include '../app/templates/config-list-interfaceconfigjs.php';
if (isset($action) && $action === 'add') {
include '../app/templates/config-host-add.php';
} elseif (isset($action) && $action === 'edit') {
include '../app/templates/config-host-edit.php';
} elseif (isset($action) && $action === 'delete') {
include '../app/templates/config-host-delete.php';
} else {
if ($userObject->hasRight($user_id, 'view config file')) {
include '../app/templates/config-host.php';
} else {
include '../app/templates/error-unauthorized.php';
}
}
break;
case 'endpoint':
$mode = $_REQUEST['mode'] ?? '';
$raw = ($mode === 'raw');
$platformInterfaceConfigjs = $configObject->getPlatformInterfaceConfigjs($platformDetails[0]['jitsi_url'], $raw);
include '../app/templates/config-list-interfaceconfigjs.php';
// TODO
break;
case 'config_file':
if (isset($action) && $action === 'edit') {
include '../app/templates/config-configfile-edit.php';