123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- <?php
- if (processForm()) {
- $values = nsParseCommonRequirements();
- if (!($_POST['priority'] >= 0 AND $_POST['priority'] <= 65535))
- output(403, 'Wrong value for <code>priority</code>.');
- if (!($_POST['weight'] >= 0 AND $_POST['weight'] <= 65535))
- output(403, 'Wrong value for <code>weight</code>.');
- if (!($_POST['port'] >= 0 AND $_POST['port'] <= 65535))
- output(403, 'Wrong value for <code>port</code>.');
- $_POST['target'] = formatAbsoluteDomain($_POST['target']);
- knotcZoneExec($_POST['zone'], array(
- $values['domain'],
- $values['ttl'],
- 'SRV',
- $_POST['priority'],
- $_POST['weight'],
- $_POST['port'],
- $_POST['target']
- ));
- output(200, 'Enregistrement ajouté/retiré.');
- }
- ?>
- <p>
- <?= linkToDocs('record-srv', 'Documentation du type d\'enregistrement SRV') ?>
- </p>
- <form method="post">
- <?php require 'form.ns.php'; ?>
- <br>
- <label for="priority">Priorité</label>
- <br>
- <input id="priority" min="0" max="65535" value="0" placeholder="0" name="priority" type="number">
- <br>
- <label for="weight">Poids</label>
- <br>
- <input id="weight" min="0" max="65535" value="0" placeholder="0" name="weight" type="number">
- <br>
- <label for="port">Port</label>
- <br>
- <input id="port" min="0" max="65535" placeholder="32768" name="port" type="number">
- <br>
- <label for="target">Cible</label>
- <br>
- <input id="target" minlenght="1" maxlength="128" placeholder="service.<?= PLACEHOLDER_DOMAIN ?>." name="target" type="text">
- <br>
- <input value="Valider" type="submit">
- </form>
|