45 lines
1.0 KiB
PHP
45 lines
1.0 KiB
PHP
<?php require "../../common/html.php"; ?>
|
|
|
|
<form method="post">
|
|
<label for="action">Action</label>
|
|
<select name="action" id="action">
|
|
<option value="add">Ajouter</option>
|
|
<option value="delete">Retirer</option>
|
|
</select>
|
|
<br>
|
|
<label for="domain">Domaine</label>
|
|
<br>
|
|
<select required="" name="domain" id="domain">
|
|
<option value="" disabled="" selected="">---</option>
|
|
<?php
|
|
foreach(regListUserDomains($_SESSION['username']) as $suffix)
|
|
echo " <option value='" . $suffix . "'>." . $suffix . "</option>\n";
|
|
?>
|
|
|
|
</select>
|
|
<br>
|
|
<label for="ns">Serveur de nom</label>
|
|
<br>
|
|
<input id="ns" placeholder="ns1.<?= CONF['common']['domain_example'] ?>." name="ns" type="text">
|
|
<br>
|
|
<input value="Valider" type="submit">
|
|
</form>
|
|
|
|
<?php
|
|
|
|
switchToFormProcess();
|
|
|
|
regCheckDomainPossession($_POST['domain']);
|
|
checkAbsoluteDomainFormat($_POST['ns']);
|
|
|
|
$suffix = regGetUpperDomain($_POST['domain']);
|
|
|
|
knotcExec($suffix, array(
|
|
$_POST['domain'],
|
|
CONF['reg']['ttl'],
|
|
"NS",
|
|
$_POST['ns']
|
|
));
|
|
|
|
success("Modification effectuée avec succès");
|