19 lines
388 B
PHP
19 lines
388 B
PHP
|
<?php
|
||
|
|
||
|
$values = nsParseCommonRequirements();
|
||
|
|
||
|
if (!($_POST['priority'] >= 0 AND $_POST['priority'] <= 255))
|
||
|
output(403, 'Wrong value for <code>priority</code>.');
|
||
|
|
||
|
$_POST['host'] = formatAbsoluteDomain($_POST['host']);
|
||
|
|
||
|
knotcZoneExec($_POST['zone'], [
|
||
|
$values['domain'],
|
||
|
$values['ttl'],
|
||
|
'MX',
|
||
|
$_POST['priority'],
|
||
|
$_POST['host']
|
||
|
]);
|
||
|
|
||
|
output(200, 'Enregistrement ajouté/retiré.');
|