36 lines
762 B
PHP
36 lines
762 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
|
|
if (nsCommonRequirements()
|
|
AND isset($_POST['txt'])
|
|
) {
|
|
|
|
$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'] . "\""
|
|
));
|
|
|
|
echo "Enregistrement ajouté";
|
|
}
|
|
|
|
?>
|
|
|
|
<?php closeHTML(); ?>
|