1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- <?php
- if (processForm()) {
- regCheckDomainPossession($_POST['suffix']);
- $domain = formatAbsoluteDomain(formatEndWithDot($_POST['subdomain']) . $_POST['suffix']);
- $record = checkIpFormat($_POST['ip']);
- knotcZoneExec(CONF['reg']['registry'], array(
- $domain,
- CONF['reg']['ttl'],
- $record,
- $_POST['ip']
- ));
- output(200, 'Glue ajouté/retiré.');
- }
- ?>
- <p>
- <?= linkToDocs('glue-record', 'Documentation sur le glue record'); ?>
- </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>
- <fieldset>
- <legend>Domaine</legend>
- <div class="elForm">
- <label for="subdomain">Sous-domaine</label>
- <br>
- <input required="" id="subdomain" placeholder="ns1" name="subdomain" type="text">
- </div>
- <div class="elForm">
- <label for="suffix">Domaine</label>
- <br>
- <select required="" name="suffix" id="suffix">
- <option value="" disabled="" selected="">---</option>
- <?php
- if (isset($_SESSION['username']))
- foreach(regListUserDomains($_SESSION['username']) as $suffix)
- echo ' <option value="' . $suffix . '">' . $suffix . '</option>' . LF;
- ?>
- </select>
- </div>
- </fieldset>
- <label for="ip">IP</label><br>
- <input required="" pattern="^[a-f0-9:.]+$" id="ip" name="ip" minlength="2" maxlength="39" size="40" type="text" placeholder="<?= PLACEHOLDER_IPV4 ?> ou <?= PLACEHOLDER_IPV6 ?>">
- <br>
- <input value="Valider" type="submit">
- </form>
|