43 lines
850 B
PHP
43 lines
850 B
PHP
<?php require "../../common/html.php"; ?>
|
|
|
|
<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="host">Hôte</label>
|
|
<br>
|
|
<input id="host" placeholder="mail.<?= PLACEHOLDER_DOMAIN ?>." name="host" type="text">
|
|
|
|
<br>
|
|
<input value="Valider" type="submit">
|
|
</form>
|
|
|
|
<?php
|
|
|
|
switchToFormProcess();
|
|
|
|
$values = nsParseCommonRequirements();
|
|
|
|
if (!($_POST['priority'] >= 0 AND $_POST['priority'] <= 255))
|
|
userError("Wrong value for <code>priority</code>.");
|
|
|
|
$_POST['host'] = formatAbsoluteDomain($_POST['host']);
|
|
|
|
knotcZoneExec($_POST['zone'], array(
|
|
$values['domain'],
|
|
$values['ttl'],
|
|
"MX",
|
|
$_POST['priority'],
|
|
$_POST['host']
|
|
));
|
|
|
|
success("Enregistrement ajouté");
|