47 lines
1.1 KiB
PHP
47 lines
1.1 KiB
PHP
<?php
|
|
|
|
if (processForm()) {
|
|
regCheckDomainPossession($_POST['domain']);
|
|
$_POST['ns'] = formatAbsoluteDomain($_POST['ns']);
|
|
|
|
knotcZoneExec(CONF['reg']['registry'], array(
|
|
$_POST['domain'],
|
|
CONF['reg']['ttl'],
|
|
'NS',
|
|
$_POST['ns']
|
|
));
|
|
|
|
output(200, 'Enregistrement ajouté/retiré.');
|
|
}
|
|
|
|
?>
|
|
|
|
<p>
|
|
<?= linkToDocs('record-ns', 'Documentation du type d\'enregistrement NS') ?>
|
|
</p>
|
|
|
|
<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
|
|
if (isset($_SESSION['id']))
|
|
foreach (regListUserDomains($_SESSION['id']) as $domain)
|
|
echo ' <option value="' . $domain . '">' . $domain . '</option>' . LF;
|
|
?>
|
|
</select>
|
|
<br>
|
|
<label for="ns">Serveur de nom</label>
|
|
<br>
|
|
<input id="ns" placeholder="ns1.<?= PLACEHOLDER_DOMAIN ?>." name="ns" type="text">
|
|
<br>
|
|
<input value="Valider" type="submit">
|
|
</form>
|