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-01-21 00:27:52 +00:00
< label for = " zone " >< ? = _ ( 'Zone to be changed' ) ?> </label>
2022-12-20 20:17:03 +00:00
< br >
< select required = " " name = " zone " id = " zone " >
< option value = " " disabled = " " selected = " " >-</ option >
< ? php
foreach ( nsListUserZones () as $zone )
echo ' <option value="' . $zone . '">' . $zone . '</option>' . LF ;
?>
</ 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
if ( isset ( $data [ 'zone_content' ])) { // Display zone
?>
< form method = " post " >
< input type = " hidden " name = " zone " value = " <?= $_POST['zone'] ?> " >
2023-01-21 00:27:52 +00:00
< label for = " zone-content " >< ? = sprintf ( _ ( 'New content of the %s zone' ), '<code><strong>' . $_POST [ 'zone' ] . '</strong></code>' ) ?> </label>
2022-12-20 20:17:03 +00:00
< br >
< textarea id = " zone-content " name = " zone-content " wrap = " off " rows = " <?= substr_count( $data['zone_content'] , LF) + 1 ?> " >< ? = htmlspecialchars ( $data [ 'zone_content' ]) ?> </textarea>
< 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-01-21 00:27:52 +00:00
< p >< ? = sprintf ( _ ( 'If the TTL is omitted, it will default to %s seconds.' ), '<code><time datetime="PT' . DEFAULT_TTL . 'S">' . 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-01-21 00:27:52 +00:00
< p >< ? = sprintf ( _ ( 'Submitted zone content is limited to %s characters.' ), ZONE_MAX_CHARACTERS ) ?> </p>
2022-12-20 20:17:03 +00:00
2023-01-21 00:27:52 +00:00
< p >< ? = sprintf ( _ ( 'TTLs must last between %1$s and %2$s seconds.' ), '<code><time datetime="PT' . MIN_TTL . 'S">' . MIN_TTL . '</time></code>' , '<code><time datetime="PT' . MAX_TTL . 'S">' . MAX_TTL . '</time></code>' ) ?> </p>
2022-12-20 20:17:03 +00:00
2023-01-21 00:27:52 +00:00
< p >< ? = _ ( 'The only types that can be defined are:' ) ?> </p>
2022-12-20 20:17:03 +00:00
< ul >
< ? php
foreach ( ALLOWED_TYPES as $allowed_type )
echo ' <li><code>' . $allowed_type . '</code></li>' ;
?>
</ ul >