2023-07-17 19:15:18 +00:00
< ? php declare ( strict_types = 1 ); ?>
2022-12-20 20:17:03 +00:00
< form method = " post " >
2023-07-30 23:13:06 +00:00
< label for = " domain " >< ? = _ ( 'Zone to be changed' ) ?> </label>
2022-12-20 20:17:03 +00:00
< br >
2023-07-30 23:13:06 +00:00
< select required = " " name = " domain " id = " domain " >
2022-12-20 20:17:03 +00:00
< option value = " " disabled = " " selected = " " >-</ option >
< ? php
2023-07-30 23:13:06 +00:00
foreach ( nsListUserZones () as $domain )
echo ' <option value="' . $domain . '">' . $domain . '</option>' . LF ;
2022-12-20 20:17:03 +00:00
?>
</ select >
< br >
2023-01-21 00:27:52 +00:00
< input type = " submit " value = " <?= _('Display') ?> " >
2022-12-20 20:17:03 +00:00
</ form >
< ? php
2023-07-30 23:13:06 +00:00
if ( isset ( $data [ 'records' ])) { // Display zone
2022-12-20 20:17:03 +00:00
?>
< form method = " post " >
2023-07-30 23:13:06 +00:00
< input type = " hidden " name = " domain " value = " <?= $_POST['domain'] ?> " >
2022-12-20 20:17:03 +00:00
2023-07-30 23:13:06 +00:00
< label for = " zone-content " >< ? = sprintf ( _ ( 'Authoritative records for %s' ), '<code><strong>' . $_POST [ 'domain' ] . '</strong></code>' ) ?> </label>
2022-12-20 20:17:03 +00:00
< br >
2023-07-30 23:13:06 +00:00
< textarea id = " records " name = " records " wrap = " off " rows = " <?= substr_count( $data['records'] , LF) + 1 ?> " >< ? = htmlspecialchars ( $data [ 'records' ]) ?> </textarea>
2022-12-20 20:17:03 +00:00
< br >
2023-01-21 00:27:52 +00:00
< input type = " submit " value = " <?= _('Replace') ?> " >
2022-12-20 20:17:03 +00:00
</ form >
< ? php
}
displayFinalMessage ( $data );
?>
2023-01-21 00:27:52 +00:00
< h2 >< ? = _ ( 'Default values' ) ?> </h2>
2022-12-20 20:17:03 +00:00
2023-07-30 23:13:06 +00:00
< p >< ? = sprintf ( _ ( 'If the TTL is omitted, it will default to %s seconds.' ), '<code><time datetime="PT' . NS_DEFAULT_TTL . 'S">' . NS_DEFAULT_TTL . '</time></code>' ) ?> </p>
2022-12-20 20:17:03 +00:00
2023-01-21 00:27:52 +00:00
< p >< ? = _ ( 'Precising the class (<code>IN</code>) is optional.' ) ?> </p>
2022-12-20 20:17:03 +00:00
2023-01-21 00:27:52 +00:00
< h2 >< ? = _ ( 'Allowed values' ) ?> </h2>
2022-12-20 20:17:03 +00:00
2023-07-30 23:13:06 +00:00
< p >< ? = sprintf ( _ ( 'Submitted field content is limited to %s characters.' ), NS_TEXTAREA_MAX_CHARACTERS ) ?> </p>
2022-12-20 20:17:03 +00:00
2023-07-30 23:13:06 +00:00
< p >< ? = sprintf ( _ ( 'TTLs must last between %1$s and %2$s seconds.' ), '<code><time datetime="PT' . NS_MIN_TTL . 'S">' . NS_MIN_TTL . '</time></code>' , '<code><time datetime="PT' . NS_MAX_TTL . 'S">' . NS_MAX_TTL . '</time></code>' ) ?> </p>
2022-12-20 20:17:03 +00:00
2023-07-30 23:13:06 +00:00
< p >< ? = _ ( 'The only types that can be defined here are:' ) ?> </p>
2022-12-20 20:17:03 +00:00
< ul >
< ? php
2023-07-30 23:13:06 +00:00
foreach ( NS_ALLOWED_TYPES as $allowed_type )
2022-12-20 20:17:03 +00:00
echo ' <li><code>' . $allowed_type . '</code></li>' ;
?>
</ ul >