servnest/nic/glue.php

37 lines
1.0 KiB
PHP
Raw Normal View History

2021-01-22 21:58:46 +01:00
<?php require "../top.inc.php"; ?>
<form method="POST" action="glue.php">
<br>
<label for="ns">Serveur de nom</label>
<br>
<input id="ns" placeholder="ns1.atope.art" name="ns" type="text">
<br>
<label for="ipv4">IPv4</label>
<br>
<input id="ipv4" placeholder="127.0.0.1" name="ipv4" type="text">
<br>
<label for="ipv6">IPv6</label>
<br>
<input id="ipv6" placeholder="::1" name="ipv6" type="text">
<br>
<input value="Valider" type="submit">
2021-01-22 21:58:46 +01:00
</form>
<?php
if (isset($_POST['ipv4']) AND isset($_POST['ns'])) {
exec("knotc zone-begin atope.art");
exec("knotc zone-set atope.art " . $_POST['ns'] . ". 200 IN A " . $_POST['ipv4']);
//exec("knotc zone-set atope.art " . $_POST['ns'] . ". 200 IN AAAA " . $_POST['ipv6'] . ".");
exec("knotc zone-commit atope.art");
echo "Modifications appliquées";
} else {
echo "Rien n'a été appliqué lors du dernier chargement.";
}
?>
<?php require "../bottom.inc.php"; ?>