Stable
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
use GlpiPlugin\Urbackup\Profile;
|
||||
use GlpiPlugin\Urbackup\Server;
|
||||
use GlpiPlugin\Urbackup\ServerAsset;
|
||||
use Html;
|
||||
|
||||
if (!defined('GLPI_ROOT')) {
|
||||
define('GLPI_ROOT', dirname(__DIR__, 4));
|
||||
}
|
||||
|
||||
include_once GLPI_ROOT . "/inc/includes.php";
|
||||
|
||||
if (!Profile::canCurrentUser(READ)) {
|
||||
Html::displayRightError();
|
||||
}
|
||||
|
||||
$ID = $_GET['id'] ?? 0;
|
||||
|
||||
if ($ID <= 0) {
|
||||
Html::redirect(PLUGIN_URBACKUP_WEB_DIR . '/front/server.php');
|
||||
}
|
||||
|
||||
$server = new Server();
|
||||
if (!$server->getFromDB($ID)) {
|
||||
Html::redirect(PLUGIN_URBACKUP_WEB_DIR . '/front/server.php');
|
||||
}
|
||||
|
||||
Html::header(
|
||||
$server->fields['name'] . ' - UrBackup',
|
||||
'',
|
||||
'Assets',
|
||||
'GlpiPlugin\Urbackup\Server'
|
||||
);
|
||||
|
||||
$server->display([
|
||||
'id' => $ID,
|
||||
'show_nav' => true,
|
||||
'show_tabs' => true,
|
||||
]);
|
||||
|
||||
Html::footer();
|
||||
Reference in New Issue
Block a user