2022-05-22 14:59:45 +02:00
|
|
|
<?php require "../../common/html.php"; ?>
|
2021-02-24 18:39:42 +01:00
|
|
|
|
|
|
|
<form method="post">
|
2022-05-22 17:47:00 +02:00
|
|
|
<?php require "../../form.ns.php"; ?>
|
2022-04-18 16:05:00 +02:00
|
|
|
<br>
|
|
|
|
<label for="txt">Texte</label>
|
|
|
|
<br>
|
|
|
|
<input id="txt" minlenght="5" maxlength="8192" pattern="^[a-zA-Z0-9 =:!%$+/\()[\]_-]{5,8192}$" placeholder="Du texte..." name="txt" type="text">
|
|
|
|
<br>
|
|
|
|
<input value="Valider" type="submit">
|
2021-02-24 18:39:42 +01:00
|
|
|
</form>
|
|
|
|
|
|
|
|
<?php
|
2021-05-16 16:55:39 +02:00
|
|
|
if (nsCommonRequirements()
|
2022-04-18 16:05:00 +02:00
|
|
|
AND isset($_POST['txt'])
|
|
|
|
) {
|
2021-02-24 18:39:42 +01:00
|
|
|
|
2022-04-18 16:05:00 +02:00
|
|
|
$values = nsParseCommonRequirements();
|
2021-02-24 18:39:42 +01:00
|
|
|
|
2022-04-18 16:05:00 +02:00
|
|
|
if (!(preg_match("/^[a-zA-Z0-9 =:!%$+\/\()[\]_-]{5,8192}$/", $_POST['txt'])))
|
2022-05-20 02:19:45 +02:00
|
|
|
userError("Wrong value for <code>txt</code>.");
|
2021-02-24 18:39:42 +01:00
|
|
|
|
2022-05-25 01:16:41 +02:00
|
|
|
knotcExec($_POST['zone'], array(
|
|
|
|
$values['domain'],
|
|
|
|
$values['ttl'],
|
|
|
|
"TXT",
|
|
|
|
"\"" . $_POST['txt'] . "\""
|
|
|
|
));
|
|
|
|
|
2022-04-18 16:05:00 +02:00
|
|
|
echo "Enregistrement ajouté";
|
2021-02-24 18:39:42 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
2022-05-22 14:59:45 +02:00
|
|
|
<?php closeHTML(); ?>
|