servnest/ht/setup.php
2021-01-23 17:26:46 +01:00

27 lines
644 B
PHP

<?php require "../top.inc.php"; ?>
<p>
</p>
<form method="post">
<label for="password">Créer ce mot de passe :</label><br>
<input id="password" name="password" type="password"/><br>
<input type="submit"/>
</form>
<?php
if (isset($_SESSION['username']) AND isset($_POST['password'])) {
// Setup SFTP access
exec("sudo /root/maniver/target/debug/maniver setup-user " . $_SESSION['username'] . " " . $_POST['password']);
echo "Formulaire traité !!";
} else {
echo "Rien n'a été reçu lors du dernier chargement";
}
?>
<?php require "../bottom.inc.php"; ?>