= 0 AND $_POST['use'] <= 3)) userError("Wrong value for use."); if (!($_POST['selector'] === "0" OR $_POST['selector'] === "1")) userError("Wrong value for selector."); if (!($_POST['type'] >= 0 OR $_POST['type'] <= 2)) userError("Wrong value for type."); if (!(preg_match("/^[a-zA-Z0-9.-]{1,1024}$/", $_POST['content']))) userError("Wrong value for content."); exec(CONF['ns']['knotc_path'] . " zone-begin " . $_POST['zone']); exec(CONF['ns']['knotc_path'] . " zone-" . $values['action'] . "set " . $_POST['zone'] . " " . $values['domain'] . " " . $values['ttl'] . " IN TLSA " . $_POST['use'] . " " . $_POST['selector'] . " " . $_POST['type'] . " " . $_POST['content']); exec(CONF['ns']['knotc_path'] . " zone-commit " . $_POST['zone']); echo "Enregistrement ajouté"; } ?>