2022-09-01 04:21:17 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
if (processForm()) {
|
2022-11-28 17:16:30 +01:00
|
|
|
if (dirsStatuses('onion', 'http')[$_POST['dir']] !== true)
|
2022-09-15 19:17:48 +02:00
|
|
|
output(403, 'Wrong value for <code>dir</code>.');
|
2022-09-01 04:21:17 +02:00
|
|
|
|
|
|
|
htDeleteSite($_POST['dir'], domainType: 'onion', protocol: 'http');
|
|
|
|
|
2022-09-15 19:17:48 +02:00
|
|
|
output(200, 'Accès retiré.');
|
2022-09-01 04:21:17 +02:00
|
|
|
}
|
|
|
|
|
2022-11-28 17:16:30 +01:00
|
|
|
$dirsStatuses = dirsStatuses('onion', 'http');
|
|
|
|
|
2022-09-01 04:21:17 +02:00
|
|
|
?>
|
2022-06-11 23:50:14 +02:00
|
|
|
|
2021-02-16 19:20:19 +01:00
|
|
|
<p>
|
2022-06-11 23:50:14 +02:00
|
|
|
Retirer un accès Onion d'un dossier
|
2021-02-16 19:20:19 +01:00
|
|
|
</p>
|
|
|
|
|
|
|
|
<form method="post">
|
2022-04-18 16:05:00 +02:00
|
|
|
<label for="dir">Dossier ciblé</label><br>
|
|
|
|
<select required="" name="dir" id="dir">
|
|
|
|
<option value="" disabled="" selected="">---</option>
|
2022-05-21 02:15:36 +02:00
|
|
|
<?php
|
2022-11-20 15:11:54 +01:00
|
|
|
foreach ($dirsStatuses as $dir => $alreadyEnabled)
|
|
|
|
echo ' <option' . ($alreadyEnabled ? '' : ' disabled=""') . ' value="' . $dir . '">' . $dir . '</option>' . LF;
|
2022-05-21 02:15:36 +02:00
|
|
|
?>
|
2022-04-18 16:05:00 +02:00
|
|
|
</select>
|
|
|
|
<br>
|
|
|
|
<input value="Valider" type="submit">
|
2021-02-16 19:20:19 +01:00
|
|
|
</form>
|