Files
project16/app/views/selectIP.php
Sapoleone 93dd389437 Add remote access feature and UI improvements
- Implement `remoteAccess` functionality in `ApiCLI` for Veyon integration.
- Create `selectIP.php` view and associated form for remote access inputs.
- Add JSON configuration for lab setups (`labList.json`).
- Introduce reusable `home-button` web component.
- Update project router and controller to support new `/remoteAccess` and `/conn` routes.
- Add custom styles and icons to enhance UI.
2025-09-25 00:26:42 +02:00

67 lines
2.7 KiB
PHP

<?php
/*
* Copyright (c) 2025. Brusegan Samuele, Davanzo Andrea
* Questo file fa parte di VeyonCtrl ed è rilasciato
* sotto la licenza MIT. Vedere il file LICENSE per i dettagli.
*/
if(isset($_POST['submit'])) {
$ip = $_POST['ip'];
$type = $_POST['veyon-remoteaccess-type'];
ApiCLI::remoteAccess($ip, $type);
}
?>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Project 16</title>
<?php include COMMON_HTML_HEAD; ?>
</head>
<body data-bs-theme="dark">
<div>
<!-- Lista dei laboratori -->
<?php
/*$labList = json_decode(file_get_contents(URL_PATH.'/configs/labList.json'));
foreach ($labList as $lab) {
?>
<div class="btn btn-primary" data-ip="<?=$lab->netIP?>" data-lab="<?=$lab->name?>" data-mask="<?=$lab->subnetMask?>">
<?=$lab->name?>
</div>
<?php
}*/
?>
<!-- Lista dei computer -->
<!-- Cerca e usa una utility per trovare tutti i pc in rete -->
<!-- Lancia connessione a `EXE_NAME` -->
</div>
<div class="container">
<div class="d-flex flex-column align-items-center">
<h3 class="pb-5 pt-2">Inserisci le informazioni per la connessione</h3>
<form action="<?=URL_PATH?>/remoteAccess" method="post" class="col-3" style="background: #333; border-radius: 10px; padding: 10px;" >
<label class="form-label" for="ip">Inserisci l'ip:</label>
<input class="form-control" type="text" name="ip" id="ip">
<br>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="veyon-remoteaccess-type" id="veyon-remoteaccess-view" value="view">
<label class="form-check-label" for="veyon-remoteaccess-view">View</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="veyon-remoteaccess-type" id="veyon-remoteaccess-control" value="control">
<label class="form-check-label" for="veyon-remoteaccess-control">Control</label>
</div>
<input type="hidden" name="submit" value="submit">
<hr>
<button type="submit" class="w-100 btn btn-primary">Connetti</button>
</form>
</div>
</div>
</body>
</html>