30 lines
692 B
PHP
30 lines
692 B
PHP
<?php require "../../common/html.php"; ?>
|
|
|
|
<form method="post">
|
|
<?php require "../../form.ns.php"; ?>
|
|
<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">
|
|
</form>
|
|
|
|
<?php
|
|
|
|
switchToFormProcess();
|
|
|
|
$values = nsParseCommonRequirements();
|
|
|
|
if (!(preg_match("/^[a-zA-Z0-9 =:!%$+\/\()[\]_-]{5,8192}$/", $_POST['txt'])))
|
|
userError("Wrong value for <code>txt</code>.");
|
|
|
|
knotcExec($_POST['zone'], array(
|
|
$values['domain'],
|
|
$values['ttl'],
|
|
"TXT",
|
|
"\"" . $_POST['txt'] . "\""
|
|
));
|
|
|
|
success("Enregistrement ajouté");
|